Package rocket.generator.rebind.type

Examples of rocket.generator.rebind.type.NewType


   *            The bean definition
   */
  protected void overrideFactoryBeanCreateInstanceViaDeferredBinding(final Rpc rpc) {
    Checker.notNull("parameter:bean", rpc);

    final NewType factoryBean = rpc.getFactoryBean();

    // get the actual interface type from the async interface type.
    final Type asyncInterfaceType = rpc.getType();
    final String asyncInterfaceName = asyncInterfaceType.getName();

View Full Code Here


    }

    final GeneratorContext context = this.getGeneratorContext();
    context.debug("Overriding satisfyInit to call " + initMethod);

    final NewType beanFactory = bean.getFactoryBean();
    final Method beanFactoryInitMethod = beanFactory.getMostDerivedMethod(Constants.SATISFY_INIT, this
        .getParameterListWithOnlyObject());
    final NewMethod newMethod = beanFactoryInitMethod.copy(beanFactory);
    newMethod.setAbstract(false);
    newMethod.setFinal(true);
    newMethod.setNative(false);
View Full Code Here

   *            The rpc
   */
  protected void overrideFactoryBeanSatisfyPropertiesWithSettingServiceEntryPoint(final Rpc rpc) {
    Checker.notNull("parameter:rpc", rpc);

    final NewType factoryBean = rpc.getFactoryBean();

    final Method method = factoryBean.getMostDerivedMethod(Constants.SATISFY_PROPERTIES, this.getParameterListWithOnlyObject());
    final NewMethod newMethod = method.copy(factoryBean);
    newMethod.setAbstract(false);
    newMethod.setFinal(true);
    newMethod.setNative(false);

View Full Code Here

    context.debug(beanType.getName());

    final SetPropertiesTemplatedFile body = new SetPropertiesTemplatedFile();
    body.setBean(beanType);

    final NewType factoryBean = bean.getFactoryBean();
    final Method method = factoryBean.getMostDerivedMethod(Constants.SATISFY_PROPERTIES, this.getParameterListWithOnlyObject());

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

    final GeneratorContext context = this.getGeneratorContext();
    context.delayedBranch();
    context.info("Creating an ImageFactory which will supply all images.");

    final Iterator<ImageValue> i = this.getImageValues().iterator();
    NewType imageFactory = null;
    while (i.hasNext()) {
      if (null == imageFactory) {
        imageFactory = this.createImageFactory();

        context.branch();
View Full Code Here

  protected NewType createImageFactory() {
    final GeneratorContext context = this.getGeneratorContext();
    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);
View Full Code Here

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

    this.getGeneratorContext().debug("Created field.");

    // add a field to hold the new imageFactory type.
    final NewType beanFactory = this.getBeanFactory();
    final NewField field = beanFactory.newField();
    field.setFinal(false);
    field.setName(Constants.IMAGE_FACTORY_FIELDNAME);
    field.setStatic(false);
    field.setTransient(false);
    field.setType(imageFactory);
View Full Code Here

  protected void addImageFactorySetter(final Type imageFactory) {
    Checker.notNull("parameter:imageFactory", imageFactory);

    this.getGeneratorContext().debug("Created setter.");

    final NewType beanFactory = this.getBeanFactory();

    final NewMethod setter = beanFactory.newMethod();
    setter.setAbstract(false);
    setter.setBody(new ImageFactorySetterTemplatedFile());
    setter.setFinal(true);
    setter.setName(Constants.IMAGE_FACTORY_SETTER_NAME);
    setter.setNative(false);
View Full Code Here

  protected void addImageFactoryGetter(final Type imageFactory) {
    Checker.notNull("parameter:imageFactory", imageFactory);

    this.getGeneratorContext().debug("Created getter.");

    final NewType beanFactory = this.getBeanFactory();

    final NewMethod getter = beanFactory.newMethod();
    getter.setAbstract(false);
    getter.setFinal(true);
    getter.setName(Constants.IMAGE_FACTORY_GETTER_NAME);
    getter.setNative(false);
    getter.setReturnType(imageFactory);
View Full Code Here

    }

    final GeneratorContext context = this.getGeneratorContext();
    context.debug("Overriding destroy to call " + destroyMethod + " for bean: " + bean);

    final NewType beanFactory = bean.getFactoryBean();
    final Method beanFactoryInitMethod = beanFactory.getMostDerivedMethod(Constants.DESTROY, this.getParameterListWithOnlyObject());
    final NewMethod newMethod = beanFactoryInitMethod.copy(beanFactory);
    newMethod.setAbstract(false);
    newMethod.setFinal(true);
    newMethod.setNative(false);
View Full Code Here

TOP

Related Classes of rocket.generator.rebind.type.NewType

Copyright © 2018 www.massapicom. 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.