Package rocket.generator.rebind

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


  protected void overrideAllFactoryBeanSatisfyInits(final Set<Bean> beans) {
    Checker.notNull("parameter:beans", beans);

    final GeneratorContext context = this.getGeneratorContext();
    context.delayedBranch();
    context.info("Overriding satisfyInit methods for beans with custom initMethods.");

    final Iterator<Bean> iterator = beans.iterator();
    while (iterator.hasNext()) {
      final Bean bean = iterator.next();
      final String initMethodName = bean.getInitMethod();
View Full Code Here


  protected void overrideAllFactoryBeanSatisfyProperties(final Set<Bean> beans) {
    Checker.notNull("parameter:beans", beans);

    final GeneratorContext context = this.getGeneratorContext();
    context.branch();
    context.info("Overriding satisfyProperties method for bean(s) with 1 or more properties.");

    final Iterator<Bean> iterator = beans.iterator();
    while (iterator.hasNext()) {

      context.delayedBranch();
View Full Code Here

   * getters for each image property.
   */
  protected void createImageFactoryIfNecessary() {
    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) {
View Full Code Here

   * @return
   */
  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);
View Full Code Here

  protected void overrideAllSingletonFactoryBeanToInvokeCustomDestroy(final Set<Bean> beans) {
    Checker.notNull("parameter:beans", beans);

    final GeneratorContext context = this.getGeneratorContext();
    context.branch();
    context.info("Visiting singleton beans.");

    final Iterator<Bean> iterator = beans.iterator();
    int singletonCount = 0;
    int customDestroyMethodCount = 0;
View Full Code Here

  }

  protected void log() {
    final GeneratorContext context = this.getGeneratorContext();
    context.branch();
    context.info(this.getVisibility().getName() + (this.isInterface() ? " class " : " interface ") + this.getName());

    this.logSuperType();
    this.logImplementedInterfaces();

    context.unbranch();
View Full Code Here

   * @return The new concrete type
   */
  protected NewConcreteType subClassLoggingFactory(final String newTypeName) {
    final GeneratorContext context = this.getGeneratorContext();
    context.branch();
    context.info("Creating type that sub classes LoggingFactoryImpl");

    final NewConcreteType newType = context.newConcreteType(newTypeName);
    newType.setAbstract(false);
    newType.setFinal(true);
    newType.setSuperType(this.getLoggerFactoryImpl());
View Full Code Here

  protected void overrideLoggingFactoryImplFindLogger(final NewConcreteType loggerFactory) {
    Checker.notNull("parameter:loggerFactory", loggerFactory);

    final GeneratorContext context = this.getGeneratorContext();
    context.branch();
    context.info("Overriding " + Constants.FIND_LOGGER_METHOD);

    final List<Type> findLoggerMethodArguments = Collections.nCopies(1, context.getString());
    final Method method = loggerFactory.findMostDerivedMethod(Constants.FIND_LOGGER_METHOD, findLoggerMethodArguments);

    final NewMethod newMethod = method.copy(loggerFactory);
View Full Code Here

  protected void overrideLoggingFactoryImplCreateDefaultLogger(final NewConcreteType loggerFactory) {
    Checker.notNull("parameter:loggerFactory", loggerFactory);

    final GeneratorContext context = this.getGeneratorContext();
    context.branch();
    context.info("Overriding " + Constants.CREATE_ROOT_LOGGER_METHOD);

    final List createDefaultLoggerMethodArguments = Collections.nCopies(1, context.getString());
    final Method method = loggerFactory.findMostDerivedMethod(Constants.CREATE_ROOT_LOGGER_METHOD,
        createDefaultLoggerMethodArguments);
View Full Code Here

  protected Set<Method> findMethods(final Type type) {
    Checker.notNull("parameter:type", type);

    final GeneratorContext context = this.getGeneratorContext();
    context.branch();
    context.info("Finding abstract methods which need be implemented");

    final Set<Method> methods = new TreeSet<Method>(MethodComparator.INSTANCE); // sort
    // methods
    // in
    // alphabetical
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.