Package rocket.generator.rebind

Examples of rocket.generator.rebind.GeneratorContext.branch()


   */
  protected Type getPayloadType(final Type type) {
    Checker.notNull("parameter:type", type);

    final GeneratorContext context = this.getGeneratorContext();
    context.branch();
    context.info("Retrieving incoming payload type.");

    context.debug("Reading \"" + Constants.COMET_PAYLOAD_TYPE_ANNOTATION + "\" annotation.");
    final List values = type.getMetadataValues(Constants.COMET_PAYLOAD_TYPE_ANNOTATION);
    if (values.size() != 1) {
View Full Code Here


  protected NewConcreteType assembleNewType(final Type serviceInterface, final String newTypeName) {
    Checker.notNull("parameter:serviceInterface", serviceInterface);
    GeneratorHelper.checkJavaTypeName("parameter:TypeName", newTypeName);

    final GeneratorContext context = this.getGeneratorContext();
    context.branch();

    this.verifyServiceInterface(serviceInterface);
    this.verifyAsyncServiceInterface(serviceInterface);

    final NewConcreteType client = this.createRpcServiceClient(newTypeName, serviceInterface, this.getJavaRpcServiceClient());
View Full Code Here

    Checker.notNull("parameter:asyncServiceInterface", asyncServiceInterface);
    Checker.notNull("parameter:client", client);

    final GeneratorContext context = this.getGeneratorContext();
    context.info("Implementing " + method);
    context.branch();

    final NewMethod newMethod = this.createCorrespondingAsyncServiceInterfaceMethod(method, asyncServiceInterface, client);

    final ServiceMethodInvokerTemplatedFile body = new ServiceMethodInvokerTemplatedFile();
    newMethod.setBody(body);
View Full Code Here

    Checker.notNull("parameter:method", method);
    Checker.notNull("parameter:readableTypes", readableTypes);
    Checker.notNull("parameter:writableTypes", writableTypes);

    final GeneratorContext context = this.getGeneratorContext();
    context.branch();
    context.info("Processing " + method);

    final Iterator containerTypes = method.getMetadataValues(SerializationConstants.CONTAINER_TYPE).iterator();

    final Type list = this.getList();
View Full Code Here

    final Type list = this.getList();
    final Type set = this.getSet();
    final Type map = this.getMap();

    context.branch();
    context.debug("Parameters");

    // first process parameters...
    final Iterator parameters = method.getParameters().iterator();
    while (parameters.hasNext()) {
View Full Code Here

  protected void implementMethod(final Method method, final NewConcreteType newType) {
    Checker.notNull("parameter:method", method);
    Checker.notNull("parameter:newType", newType);

    final GeneratorContext context = this.getGeneratorContext();
    context.branch();
    context.info("Implementing " + method.getName());

    final NewMethod newMethod = method.copy(newType);
    newMethod.setAbstract(false);
    newMethod.setFinal(true);
View Full Code Here

        continue;
      }
    }

    context.unbranch();
    context.branch();
    context.debug("Return type");

    // process return type...
    final Type returnType = method.getReturnType();
    final Type voidd = this.getGeneratorContext().getVoid();
View Full Code Here

        }
      }
    }

    context.unbranch();
    context.branch();
    context.debug("Thrown types");

    // iterate over thrown types...
    final Iterator thrownTypes = method.getThrownTypes().iterator();
    while (thrownTypes.hasNext()) {
View Full Code Here

  protected NewConcreteType subClassCometClient(final String newTypeName, final Type cometClient) {
    GeneratorHelper.checkJavaTypeName("parameter:newTypeName", newTypeName);
    Checker.notNull("parameter:cometClient", cometClient);

    final GeneratorContext context = this.getGeneratorContext();
    context.branch();
    context.info("Creating new sub class of " + cometClient.getName() + " called " + newTypeName);

    final NewConcreteType subClass = context.newConcreteType(newTypeName);
    subClass.setAbstract(false);
    subClass.setFinal(true);
View Full Code Here

   */
  protected Type createRpcServiceInterface(final NewConcreteType newType) {
    Checker.notNull("parameter:newType", newType);

    final GeneratorContext context = this.getGeneratorContext();
    context.branch();
    context.info("Generating Rpc service interface which will provide the payload serializer.");

    final NewNestedInterfaceType serviceInterface = newType.newNestedInterfaceType();
    serviceInterface.setNestedName(Constants.RPC_SERVICE_INTERFACE);
    serviceInterface.setStatic(true);
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.