Examples of beginMethod()


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

        int index = 0;
        for (AnnotatedField arg : required) {
          args[index++] = arg.getType();
          args[index++] = arg.getVariableName();
        }
        jw.beginMethod(null, builder, EnumSet.of(Modifier.PUBLIC), args);

        for (AnnotatedField arg : required) {
          writePutArguments(jw, arg.getVariableName(), "mArguments", arg);
        }
View Full Code Here

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

          EnumSet.of(Modifier.PUBLIC, Modifier.FINAL), null,
          FragmentArgsInjector.class.getCanonicalName());

      jw.emitEmptyLine();
      // The mapping Method
      jw.beginMethod("void", "inject", EnumSet.of(Modifier.PUBLIC), "Object", "target");

      jw.emitEmptyLine();
      jw.emitStatement("Class<?> targetClass = target.getClass()");
      jw.emitStatement("String targetName = targetClass.getCanonicalName()");
View Full Code Here

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

      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()) {
      writer.emitStatement("this.%1$s = %1$s", providerName);
View Full Code Here

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

    }

    writer.endMethod();

    for (final FactoryMethodDescriptor methodDescriptor : descriptor.methodDescriptors()) {
      writer.beginMethod(methodDescriptor.returnType(), methodDescriptor.name(),
          methodDescriptor.publicMethod() ? EnumSet.of(PUBLIC) : EnumSet.noneOf(Modifier.class),
          parameterTokens(methodDescriptor.passedParameters()));
      FluentIterable<String> creationParameterNames =
          FluentIterable.from(methodDescriptor.creationParameters())
              .transform(new Function<Parameter, String>() {
View Full Code Here

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

    }

    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())
              .transform(new Function<Parameter, 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.