Examples of emitImports()


Examples of com.hannesdorfmann.fragmentargs.repacked.com.squareup.javawriter.JavaWriter.emitImports()

        origHelper = orig;
        JavaFileObject jfo = filer.createSourceFile(qualifiedBuilderName, orig);
        Writer writer = jfo.openWriter();
        JavaWriter jw = new JavaWriter(writer);
        writePackage(jw, entry.getKey());
        jw.emitImports("android.os.Bundle");
        jw.beginType(builder, "class", EnumSet.of(Modifier.PUBLIC, Modifier.FINAL));
        jw.emitField("Bundle", "mArguments", EnumSet.of(Modifier.PRIVATE, Modifier.FINAL),
            "new Bundle()");
        jw.emitEmptyLine();
View Full Code Here

Examples of com.hannesdorfmann.fragmentargs.repacked.com.squareup.javawriter.JavaWriter.emitImports()

      Writer writer = jfo.openWriter();
      JavaWriter jw = new JavaWriter(writer);
      // Package
      jw.emitPackage(FragmentArgs.AUTO_MAPPING_PACKAGE);
      // Imports
      jw.emitImports("android.os.Bundle");

      // Class
      jw.beginType(FragmentArgs.AUTO_MAPPING_CLASS_NAME, "class",
          EnumSet.of(Modifier.PUBLIC, Modifier.FINAL), null,
          FragmentArgsInjector.class.getCanonicalName());
View Full Code Here

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

    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");
    }

    for (String implementingType : descriptor.implementingTypes()) {
View Full Code Here

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

    writer.emitPackage(packageName)
        .emitImports("javax.annotation.Generated");

    writer.emitImports("javax.inject.Inject");
    if (!descriptor.providerNames().isEmpty()) {
      writer.emitImports("javax.inject.Provider");
    }

    for (String implementingType : descriptor.implementingTypes()) {
      String implementingPackageName = getPackage(implementingType).toString();
      if (!"java.lang".equals(implementingPackageName)
View Full Code Here

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

    for (String implementingType : descriptor.implementingTypes()) {
      String implementingPackageName = getPackage(implementingType).toString();
      if (!"java.lang".equals(implementingPackageName)
          && !packageName.equals(implementingPackageName)) {
        writer.emitImports(implementingType);
      }
    }

    String[] implementedClasses = FluentIterable.from(descriptor.implementingTypes())
        .transform(new Function<String, String>() {
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.