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

Examples of com.google.gwt.inject.rebind.util.SourceSnippetBuilder.build()


    // which package it goes in, and we don't need to invoke getUserPackageName
    // (which is good, because in practice users statically inject types that
    // have no user package name because they're private inner classes!)
    String packageName = type.getPackage().getName();
    InjectorMethod method = SourceSnippets.asMethod(false, "private void " + methodName + "()",
        packageName, body.build());
    GinjectorFragmentOutputter fragment =
        fragments.get(fragmentPackageNameFactory.create(packageName));
    fragment.outputMethod(method);
    fragment.invokeInInitializeStaticInjections(methodName);
  }
View Full Code Here


      default:
        throw new IllegalStateException();
    }

    outputMethod(SourceSnippets.asMethod(false, String.format("public %s %s()", typeName, getter),
        fragmentPackageName.toString(), getterBuilder.build()));
  }

  void outputMethod(InjectorMethod method) {
    try {
      sourceWriteUtil.writeMethod(method, writer, injectorWriteContext);
View Full Code Here

         .append("\n    }"); // End method.
    }

    sb.append("\n};"); // End factory implementation.

    return sb.build();
  }

  private SourceSnippet callAssistedCreate(AssistData assisted, NameGenerator nameGenerator,
      List<InjectorMethod> methodsOutput) throws NoSourceNameException {
    String returnTypeName = ReflectUtil.getSourceName(assisted.implementation);
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.