Examples of emitAnnotation()


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

        })
        .toSortedSet(Ordering.natural())
        .toArray(new String[0]);

    String factoryName = getSimpleName(descriptor.name()).toString();
    writer.emitAnnotation(Generated.class,
        ImmutableMap.of("value", "\"" + AutoFactoryProcessor.class.getName() + "\""));
    EnumSet<Modifier> modifiers = EnumSet.of(FINAL);
    if (descriptor.publicType()) {
      modifiers.add(PUBLIC);
    }
View Full Code Here

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

      Optional<String> qualifier = key.getQualifier();
      String qualifierPrefix = qualifier.isPresent() ? "@" + qualifier.get() + " " : "";
      constructorTokens.add(qualifierPrefix + "Provider<" + key.getType() + ">").add(providerName);
    }

    writer.emitAnnotation("Inject");
    writer.beginMethod(null, factoryName,
        descriptor.publicType() ? EnumSet.of(PUBLIC) : EnumSet.noneOf(Modifier.class),
        constructorTokens.build().toArray(new String[0]));

    for (String providerName : descriptor.providerNames().values()) {
View Full Code Here

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

      writer.endMethod();
    }

    for (ImplemetationMethodDescriptor methodDescriptor
        : descriptor.implementationMethodDescriptors()) {
      writer.emitAnnotation(Override.class);
      writer.beginMethod(methodDescriptor.returnType(), methodDescriptor.name(),
          methodDescriptor.publicMethod() ? EnumSet.of(PUBLIC) : EnumSet.noneOf(Modifier.class),
          parameterTokens(methodDescriptor.passedParameters()));
      FluentIterable<String> creationParameterNames =
          FluentIterable.from(methodDescriptor.passedParameters())
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.