Examples of NewType


Examples of rocket.generator.rebind.type.NewType

  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

Examples of rocket.generator.rebind.type.NewType

    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

Examples of rocket.generator.rebind.type.NewType

  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

Examples of rocket.generator.rebind.type.NewType

  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

Examples of rocket.generator.rebind.type.NewType

    }

    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

Examples of rocket.generator.rebind.type.NewType

   */
  protected void overrideBeanFactoryRegisterFactoryBeans() {
    final GeneratorContext context = this.getGeneratorContext();
    context.branch();

    final NewType beanFactory = this.getBeanFactory();
    final Method abstractMethod = beanFactory.getSuperType().getMostDerivedMethod(Constants.REGISTER_FACTORY_BEANS, Collections.<Type>emptyList());

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

Examples of rocket.generator.rebind.type.NewType

  protected void overrideBeanFactoryGetAliasesToBeans() {
    final GeneratorContext context = this.getGeneratorContext();
    context.branch();

    final NewType beanFactory = this.getBeanFactory();
    final Method abstractMethod = beanFactory.getSuperType().getMostDerivedMethod(Constants.GET_ALIASES_TO_BEANS_METHOD, Collections.<Type>emptyList());

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

Examples of rocket.generator.rebind.type.NewType

    context.branch();
    context.info("Overriding BeanFactory." + Constants.GET_EAGER_SINGELTON_BEAN_NAMES_METHOD
        + "() to initialize eager singleton beans on factory startup.");
    context.branch();

    final NewType beanFactory = this.getBeanFactory();
    final Method abstractMethod = beanFactory.getSuperType().getMostDerivedMethod(Constants.GET_EAGER_SINGELTON_BEAN_NAMES_METHOD,Collections.<Type>emptyList());

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

Examples of rocket.generator.rebind.type.NewType

  protected Type getNewType(final String name) {
    Type type = null;

    final Iterator<NewType> newTypes = this.getNewTypes().iterator();
    while (newTypes.hasNext()) {
      final NewType newType = newTypes.next();
      if (false == newType.hasName()) {
        continue;
      }
      if (newType.getName().equals(name)) {
        type = newType;
        break;
      }
    }
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.