Examples of NewNestedInterfaceType


Examples of rocket.generator.rebind.type.NewNestedInterfaceType

    context.branch();
    context.info("Creating Image Factory");

    final NewType beanFactory = this.getBeanFactory();

    final NewNestedInterfaceType imageFactory = beanFactory.newNestedInterfaceType();
    imageFactory.setNestedName(Constants.IMAGE_FACTORY_NESTED_CLASS_NAME);
    imageFactory.setStatic(true);
    imageFactory.setSuperType(this.getImageFactory());
    imageFactory.setVisibility(Visibility.PACKAGE_PRIVATE);

    this.addImageFactoryField(imageFactory);
    this.addImageFactoryGetter(imageFactory);
    this.addImageFactorySetter(imageFactory);
View Full Code Here

Examples of rocket.generator.rebind.type.NewNestedInterfaceType

    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());
    serviceInterface.setVisibility(Visibility.PUBLIC);

    final NewMethod newMethod = serviceInterface.newMethod();
    newMethod.setAbstract(true);
    newMethod.setFinal(false);
    newMethod.setName(Constants.PAYLOAD_DECLARATION_METHOD);
    newMethod.setNative(false);
View Full Code Here

Examples of rocket.generator.rebind.type.NewNestedInterfaceType

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

    final NewMethod newMethod = asyncServiceInterface.newMethod();
    newMethod.setAbstract(true);
    newMethod.setFinal(false);
    newMethod.setName(Constants.PAYLOAD_DECLARATION_METHOD);
    newMethod.setNative(false);
    newMethod.setReturnType(context.getVoid());
View Full Code Here

Examples of rocket.generator.rebind.type.NewNestedInterfaceType

    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());
    serviceInterface.setVisibility(Visibility.PUBLIC);

    final NewMethod newMethod = serviceInterface.newMethod();
    newMethod.setAbstract(true);
    newMethod.setFinal(false);
    newMethod.setName(Constants.PAYLOAD_DECLARATION_METHOD);
    newMethod.setNative(false);
View Full Code Here

Examples of rocket.generator.rebind.type.NewNestedInterfaceType

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

    final NewMethod newMethod = asyncServiceInterface.newMethod();
    newMethod.setAbstract(true);
    newMethod.setFinal(false);
    newMethod.setName(Constants.PAYLOAD_DECLARATION_METHOD);
    newMethod.setNative(false);
    newMethod.setReturnType(context.getVoid());
View Full Code Here

Examples of rocket.generator.rebind.type.NewNestedInterfaceType

  protected Type createSerializationFactoryComposer(final Method method, final NewConcreteType client, final Type serviceInterface) {
    Checker.notNull("parameter:method", method);
    Checker.notNull("parameter:client", client);
    Checker.notNull("parameter:serviceInterface", serviceInterface);

    final NewNestedInterfaceType serializationFactoryComposer = client.newNestedInterfaceType();

    final List<Type> parameterTypes = new ArrayList<Type>();
    final Iterator<MethodParameter> methodParameters = method.getParameters().iterator();
    while (methodParameters.hasNext()) {
      final MethodParameter parameter = methodParameters.next();
      parameterTypes.add(parameter.getType());
    }

    final Method serviceMethod = serviceInterface.findMethod(method.getName(), parameterTypes);
    final List<Method> serviceMethods = new ArrayList<Method>();
    serviceMethods.addAll(serviceInterface.getMethods());
    final int methodNumber = serviceMethods.indexOf(serviceMethod);
    final String newNestedName = Constants.NESTED_SERIALIZATION_FACTORY_COMPOSER + methodNumber;

    serializationFactoryComposer.setNestedName(newNestedName);
    serializationFactoryComposer.setSuperType(this.getSerializationFactoryComposer());
    serializationFactoryComposer.setStatic(false);
    serializationFactoryComposer.setVisibility(Visibility.PUBLIC);

    // build up a set containing of readableType which will contain all
    // throwable types and the method return type.
    final Set<Type> readableTypes = new TreeSet(TypeComparator.INSTANCE);
    final Set<Type> writableTypes = new TreeSet(TypeComparator.INSTANCE);
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.