Examples of SourceSnippet


Examples of com.google.gwt.inject.rebind.util.SourceSnippet

  void writeBindingGetter(Key<?> key, Binding binding, GinScope scope,
      List<InjectorMethod> helperMethodsOutput) {
    Context bindingContext = binding.getContext();

    SourceSnippetBuilder getterBuilder = new SourceSnippetBuilder();
    SourceSnippet creationStatements;
    String getter = nameGenerator.getGetterMethodName(key);

    String typeName;
    try {
      typeName = ReflectUtil.getSourceName(key.getTypeLiteral());
View Full Code Here

Examples of com.google.gwt.inject.rebind.util.SourceSnippet

      String signature = ReflectUtil.signatureBuilder(assisted.method)
          .removeAbstractModifier()
          .build();

      SourceSnippet methodCall = methodCallUtil.createMethodCallWithInjection(
          assisted.constructor, null, assisted.parameterNames, nameGenerator, methodsOutput);

      SourceSnippet assistedCreateCall = callAssistedCreate(assisted, nameGenerator, methodsOutput);

      sb.append("\n\n    ").append(signature).append(" {")
         .append("\n      return ").append(assistedCreateCall).append(";")
         .append("\n    }"); // End method.
    }
View Full Code Here

Examples of com.google.gwt.inject.rebind.util.SourceSnippet

    String assistedInjectSignature = ReflectUtil.signatureBuilder(assisted.method)
        .withMethodName(assistedInjectMethodName)
        .removeAbstractModifier()
        .build();

    SourceSnippet memberInjectCall =
        SourceSnippets.callMemberInject(assisted.implementation, "result");
    SourceSnippet methodCall = methodCallUtil.createMethodCallWithInjection(
        assisted.constructor, null, assisted.parameterNames, nameGenerator, methodsOutput);

    SourceSnippet assistedInjectMethodBody = new SourceSnippetBuilder()
        .append(returnTypeName).append(" result = ").append(methodCall)
        .append("\n").append(memberInjectCall)
        .append("\nreturn result;")
        .build();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.