Package com.google.gwt.inject.rebind.util

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


    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


  public SourceSnippet getCreationStatements(NameGenerator nameGenerator,
      List<InjectorMethod> methodsOutput) throws NoSourceNameException {
    String providedType = ReflectUtil.getSourceName(sourceKey.getTypeLiteral());

    return new SourceSnippetBuilder()
        .append(providedType).append(" result = ").append(SourceSnippets.callGetter(providerKey))
        .append(".get();")
        .build();
  }
View Full Code Here

  public SourceSnippet getCreationStatements(NameGenerator nameGenerator,
      List<InjectorMethod> methodsOutput) throws NoSourceNameException {
    String providerTypeName = ReflectUtil.getSourceName(providerType);
    String targetKeyName = ReflectUtil.getSourceName(targetKey.getTypeLiteral());

    return new SourceSnippetBuilder()
        .append(providerTypeName).append(" result = new ")
        .append(providerTypeName).append("() { \n")
        .append("    public void get(")
        .append("final com.google.gwt.user.client.rpc.AsyncCallback<? super ")
        .append(targetKeyName).append("> callback) { \n")
View Full Code Here

  public SourceSnippet getCreationStatements(NameGenerator nameGenerator,
      List<InjectorMethod> methodsOutput) throws NoSourceNameException {
    String providerTypeName = ReflectUtil.getSourceName(providerType);
    String targetKeyName = ReflectUtil.getSourceName(targetKey.getTypeLiteral());

    return new SourceSnippetBuilder()
        .append(providerTypeName).append(" result = new ")
        .append(providerTypeName).append("() { \n")
        .append("  public ").append(targetKeyName).append(" get() { \n")
        .append("    return ").append(SourceSnippets.callGetter(targetKey)).append(";\n")
        .append("  }\n")
View Full Code Here

      List<InjectorMethod> methodsOutput) throws NoSourceNameException {
    String moduleSourceName = ReflectUtil.getSourceName(moduleType);
    String createModule = "new " + moduleSourceName + "()";
    String type = ReflectUtil.getSourceName(targetKey.getTypeLiteral());

    return new SourceSnippetBuilder()
        .append(type).append(" result = ")
        .append(methodCallUtil.createMethodCallWithInjection(providerMethod, createModule,
            nameGenerator, methodsOutput))
        .build();
  }
View Full Code Here

  public SourceSnippet getCreationStatements(NameGenerator nameGenerator,
      List<InjectorMethod> methodsOutput) throws NoSourceNameException {

    String type = ReflectUtil.getSourceName(sourceClassKey.getTypeLiteral());

    return new SourceSnippetBuilder()
        .append(type).append(" result = ").append(SourceSnippets.callGetter(boundClassKey))
        .append(";")
        .build();
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.inject.rebind.util.SourceSnippetBuilder

Copyright © 2018 www.massapicom. 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.