Package com.squareup.javawriter

Examples of com.squareup.javawriter.JavaWriter.emitPackage()


  void writeFactory(final FactoryDescriptor descriptor)
      throws IOException {
    JavaFileObject sourceFile = filer.createSourceFile(descriptor.name());
    JavaWriter writer = new JavaWriter(sourceFile.openWriter());
    String packageName = getPackage(descriptor.name()).toString();
    writer.emitPackage(packageName)
        .emitImports("javax.annotation.Generated");

    writer.emitImports("javax.inject.Inject");
    if (!descriptor.providerNames().isEmpty()) {
      writer.emitImports("javax.inject.Provider");
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.