Package rocket.generator.rebind

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


   * @return A new type
   */
  protected NewConcreteType createType(final Type type, final String newTypeName) {
    final GeneratorContext context = this.getGeneratorContext();
    context.branch();
    context.info(newTypeName);

    final NewConcreteType newType = context.newConcreteType(newTypeName);
    newType.setAbstract(false);
    newType.setFinal(true);

View Full Code Here


    final Set<String> urls = new TreeSet<String>();

    final GeneratorContext context = this.getGeneratorContext();
    context.branch();
    context.info("Implementing abstract methods.");

    final TreeSet<Method> sortedMethods = new TreeSet<Method>(MethodComparator.INSTANCE);
    sortedMethods.addAll(methods);
    final Iterator<Method> iterator = sortedMethods.iterator();
    while (iterator.hasNext()) {
View Full Code Here

    String prefetchUrl = null;

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

    // get the filename
    final String resourceName = this.getImageName(method);
    context.debug(resourceName);
View Full Code Here

    Checker.notNull("parameter:preFetchUrls", preFetchUrls);

    final GeneratorContext context = this.getGeneratorContext();
    final String methodName = ImageFactoryConstants.GET_PRELOAD_URLS;
    context.branch();
    context.info("Overriding " + methodName + " to preload.");

    final Method method = newType.findMostDerivedMethod(methodName, Collections.<Type>emptyList());
    final NewMethod newMethod = method.copy(newType);
    newMethod.setAbstract(false);
    newMethod.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);
    serviceInterface.setSuperType(this.getRemoteService());
View Full Code Here

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

    final GeneratorContext context = this.getGeneratorContext();
    context.branch();
    context.info("Generating Rpc async service interface counterpart for the rpc service interface.");

    final NewNestedInterfaceType asyncServiceInterface = newType.newNestedInterfaceType();
    asyncServiceInterface.setNestedName(Constants.RPC_ASYNC_SERVICE_INTERFACE);
    asyncServiceInterface.setStatic(true);
    asyncServiceInterface.setVisibility(Visibility.PUBLIC);
View Full Code Here

  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) {
      throwUnableToFindCometPayloadTypeAnnotation(type);
View Full Code Here

    Checker.notNull("parameter:serviceInterface", serviceInterface);
    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();
View Full Code Here

    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();
    final Type set = this.getSet();
View Full Code Here

    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);
    newMethod.setNative(false);
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.