Package rocket.generator.rebind

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


      final GeneratorContext context = this.getGeneratorContext();
      context.branch();

      final String message = "Methods";
      context.debug(message);

      writer.beginJavaDocComment();
      writer.print(message);
      writer.endJavaDocComment();
View Full Code Here


      final GeneratorContext context = this.getGeneratorContext();
      context.branch();

      final String message = "Nested Types";
      context.debug(message);

      writer.beginJavaDocComment();
      writer.print(message);
      writer.endJavaDocComment();
View Full Code Here

    }
    includedFiles.add(fileName);

    final Generator generator = this.getGenerator();
    final GeneratorContext context = generator.getGeneratorContext();
    context.debug(fileName);

    final InputStream inputStream = generator.getResource(fileName);
    final Document document = this.getDocumentBuilder().parse(inputStream);
    this.setDocument(document);
View Full Code Here

    final FindLoggerTemplatedFile template = new FindLoggerTemplatedFile();
    newMethod.setBody(template);

    final LoggingFactoryConfig config = this.getLoggingFactoryConfig();
    context.debug("Config: " + config);

    final Iterator<String> names = config.getNames();
    while (names.hasNext()) {
      final String name = names.next();
      final String loggerTypeName = config.getTypeName(name);
View Full Code Here

    while (names.hasNext()) {
      final String name = names.next();
      final String loggerTypeName = config.getTypeName(name);
      final LoggingLevel loggingLevel = config.getLoggingLevel(name);

      context.debug(name + "=" + loggerTypeName + " (" + loggingLevel + ")");

      final Constructor loggingLevelLogger = this.getConstructorForLoggingLevel(loggingLevel);
      final Constructor logger = this.getTargetLoggerConstructor(loggerTypeName);

      template.register(name, loggingLevelLogger, logger);
View Full Code Here

    createLogger.setLevelLogger(this.getConstructorForLoggingLevel(loggingLevel));

    final String typeName = config.getTypeName(category);
    createLogger.setLogger(this.getTargetLoggerConstructor(typeName));

    context.debug("Type: " + typeName);

    // rename parameter to a known name.
    final NewMethodParameter parameter = (NewMethodParameter) newMethod.getParameters().get(0);
    parameter.setName(Constants.CREATE_ROOT_NAME_PARAMETER);
    parameter.setFinal(true);
View Full Code Here

   * @return A Constructor that takes a String parameter.
   */
  protected Constructor getTargetLoggerConstructor(final String typeName) {
    final GeneratorContext context = this.getGeneratorContext();
    context.branch();
    context.debug(typeName);

    final Type type = context.getType(typeName);
    context.debug(type.toString());

    // make sure type is really a Logger.
View Full Code Here

    final GeneratorContext context = this.getGeneratorContext();
    context.branch();
    context.debug(typeName);

    final Type type = context.getType(typeName);
    context.debug(type.toString());

    // make sure type is really a Logger.
    final Type logger = this.getLogger();
    if (false == type.isAssignableTo(logger)) {
      throwTargetLoggerIsNotALogger(type);
View Full Code Here

    final Constructor constructor = type.getConstructor(stringParameter);
    if (constructor.getVisibility() != Visibility.PUBLIC) {
      throwTargetLoggerConstructorIsNotPublic(constructor);
    }

    context.debug("Found " + constructor);
    context.unbranch();

    return constructor;
  }
View Full Code Here

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

    final GeneratorContext context = this.getGeneratorContext();
    context.branch();
    context.debug("Overriding " + Constants.READ_FIELDS_METHOD + "() and creating list setters for type \"" + deserializer.getName()
        + "\".");

    final NewMethod readFields = deserializer.newMethod();
    readFields.setAbstract(false);
    readFields.setFinal(false);
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.