Examples of NewConcreteType


Examples of rocket.generator.rebind.type.NewConcreteType

   * @param superType
   * @return A new NewConcreteType
   */
  protected NewConcreteType createRpcServiceClient(final String newTypeName, final Type serviceInterface, final Type superType) {
    final GeneratorContext context = this.getGeneratorContext();
    final NewConcreteType type = context.newConcreteType(newTypeName);
    type.setAbstract(false);
    type.setFinal(true);
    type.setSuperType(superType);
    type.setVisibility(Visibility.PUBLIC);

    type.addInterface(this.getAsyncServiceInterface(serviceInterface));
    type.addInterface(this.getRequiredInterface());
    type.addInterface(this.getServiceDefTarget());

    return type;
  }
View Full Code Here

Examples of rocket.generator.rebind.type.NewConcreteType

    context.branch();

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

    final NewConcreteType client = this.createRpcServiceClient(newTypeName, serviceInterface, this.getJsonRpcServiceClient());
    this.implementPublicMethods(serviceInterface, client);

    context.unbranch();
    return client;
  }
View Full Code Here

Examples of rocket.generator.rebind.type.NewConcreteType

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

    NewConcreteType deserializer = null;

    this.verifyTypeHasNoArgumentsConstructor(type);

    // check if super type deserializer exists for type...
    final GeneratorContext context = this.getGeneratorContext();
View Full Code Here

Examples of rocket.generator.rebind.type.NewConcreteType

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

    final GeneratorContext context = this.getGeneratorContext();
    context.debug("Creating new type \"" + type.getName() + "\".");

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

    // extend either JsonSerializerType or the generated type of type...
    Type superType = type.getSuperType();
    String superTypeName = Constants.JSON_SERIALIZER_TYPE;
    if (false == superType.equals(context.getObject())) {
      superTypeName = this.getGeneratedTypeName(superType.getName());
    }
    superType = context.getType(superTypeName);
    newType.setSuperType(superType);
    newType.setVisibility(Visibility.PUBLIC);

    return newType;
  }
View Full Code Here

Examples of rocket.generator.rebind.type.NewConcreteType

  protected NewConcreteType assembleNewType(final Type type, final String newTypeName) {
    this.verifyBeanFactory(type);

    final DocumentWalker document = this.getDocumentWalker(type);

    final NewConcreteType beanFactory = this.createBeanFactory(newTypeName, type);
    this.setBeanFactory(beanFactory);

    final Set<Bean> beans = document.getBeans();

    this.setBeans(this.createBeans());
View Full Code Here

Examples of rocket.generator.rebind.type.NewConcreteType

   * @return A new type.
   */
  protected NewConcreteType createBeanFactory(final String newTypeName, final Type implementsInterface) {
    this.getGeneratorContext().info("Creating BeanFactory with a name of \"" + newTypeName + "\".");

    final NewConcreteType beanFactory = this.getGeneratorContext().newConcreteType(newTypeName);

    beanFactory.setAbstract(false);
    beanFactory.setFinal(true);
    beanFactory.setSuperType(this.getBeanFactoryImpl());
    beanFactory.setVisibility(Visibility.PUBLIC);
    beanFactory.addInterface(implementsInterface);

    return beanFactory;
  }
View Full Code Here

Examples of rocket.generator.rebind.type.NewConcreteType

      }
    }

    // start creating the factory bean...
    final Type superType = singleton ? this.getSingletonFactoryBean() : this.getPrototypeFactoryBean();
    final NewConcreteType beanFactory = this.getBeanFactory();
    final NewNestedType factoryBean = beanFactory.newNestedType();
    factoryBean.setStatic(false);
    factoryBean.setNestedName(this.escapeBeanIdToBeClassNameSafe(beanName) + Constants.FACTORY_BEAN_SUFFIX);
    factoryBean.setSuperType(superType);
    factoryBean.setVisibility(Visibility.PRIVATE);
View Full Code Here

Examples of rocket.generator.rebind.type.NewConcreteType

    context.debug("service interface: " + interfaceName);
    context.debug("async service interface: " + beanType.getName());

    final Type superType = this.getSingletonFactoryBean();
    final NewConcreteType beanFactory = this.getBeanFactory();
    final NewNestedType factoryBean = beanFactory.newNestedType();
    factoryBean.setStatic(false);
    factoryBean.setNestedName(this.escapeBeanIdToBeClassNameSafe(id) + Constants.FACTORY_BEAN_SUFFIX);
    factoryBean.setSuperType(superType);
    factoryBean.setVisibility(Visibility.PRIVATE);
    rpc.setFactoryBean(factoryBean);
View Full Code Here

Examples of rocket.generator.rebind.type.NewConcreteType

    final String id = bean.getId();
    context.debug(id);

    final Type superType = this.getProxyFactoryBean();

    final NewConcreteType beanFactory = this.getBeanFactory();
    final NewNestedType proxyFactoryBean = beanFactory.newNestedType();
    proxyFactoryBean.setStatic(false);
    proxyFactoryBean.setNestedName(this.escapeBeanIdToBeClassNameSafe(id) + Constants.PROXY_FACTORY_BEAN_SUFFIX);
    proxyFactoryBean.setSuperType(superType);
    proxyFactoryBean.setVisibility(Visibility.PRIVATE);
View Full Code Here

Examples of rocket.generator.rebind.type.NewConcreteType

    final Type targetBeanType = bean.getType();
    final String id = bean.getId();

    // sub class the target...
    final NewConcreteType beanFactory = this.getBeanFactory();
    final NewNestedType proxy = beanFactory.newNestedType();
    proxy.setStatic(false);
    proxy.setNestedName(this.escapeBeanIdToBeClassNameSafe(id) + Constants.PROXY_SUFFIX);

    if (bean instanceof Rpc) {
      proxy.addInterface(targetBeanType);
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.