Package rocket.generator.rebind

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


  public void write(final SourceWriter writer) {
    Checker.notNull("parameter:writer", writer);

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

    this.writeComments(writer);

    this.writeDeclaration(writer);
View Full Code Here


      buf.append(this.isInterface() ? "interface " : "class ");

      buf.append(this.getSimpleName());

      context.branch();

      context.debug(buf.toString());

      this.logSuperType();
      this.logImplementedInterfaces();
View Full Code Here

    final GeneratorContext context = this.getGeneratorContext();
    if (context.isDebugEnabled()) {

      final Set<Type> interfaces = this.getInterfaces();
      if (false == interfaces.isEmpty()) {
        context.branch();
        context.debug("implements");

        final Iterator<Type> interfacesIterator = interfaces.iterator();
        while (interfacesIterator.hasNext()) {
          final Type interfacee = interfacesIterator.next();
View Full Code Here

      final Set<Constructor> sorted = new TreeSet<Constructor>(ConstructorComparator.INSTANCE);
      sorted.addAll(constructors);

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

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

      writer.beginJavaDocComment();
View Full Code Here

    if (false == fields.isEmpty()) {
      final Set<Field> sorted = new TreeSet<Field>(FieldComparator.INSTANCE);
      sorted.addAll(fields);

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

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

      writer.beginJavaDocComment();
View Full Code Here

      final Set<Method> sorted = new TreeSet<Method>(MethodComparator.INSTANCE);
      sorted.addAll(methods);

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

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

      writer.beginJavaDocComment();
View Full Code Here

      final Set<Type> sorted = new TreeSet<Type>(TypeComparator.INSTANCE);
      sorted.addAll(types);

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

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

      writer.beginJavaDocComment();
View Full Code Here

   *            Its new name
   * @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);
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);

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

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.