Package rocket.generator.rebind.type

Examples of rocket.generator.rebind.type.NewConcreteType


    final GeneratorContext context = this.getGeneratorContext();
    context.branch();
    context.info("Creating new sub class of " + cometClient.getName() + " called " + newTypeName);

    final NewConcreteType subClass = context.newConcreteType(newTypeName);
    subClass.setAbstract(false);
    subClass.setFinal(true);
    subClass.setSuperType(cometClient);

    context.unbranch();

    return subClass;
  }
View Full Code Here


*/
public class LoggerFactoryGenerator extends Generator {

  @Override
  protected NewConcreteType assembleNewType(final Type type, final String newTypeName) {
    final NewConcreteType loggingFactory = this.subClassLoggingFactory(newTypeName);
    this.overrideLoggingFactoryImplFindLogger(loggingFactory);
    this.overrideLoggingFactoryImplCreateDefaultLogger(loggingFactory);
    return loggingFactory;
  }
View Full Code Here

  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());
    newType.setVisibility(Visibility.PUBLIC);

    context.unbranch();

    return newType;
  }
View Full Code Here

    final long started = System.currentTimeMillis();

    if (null == context.findType(newTypeName)) {

      try {
        final NewConcreteType newType = this.assembleNewType(typeName, newTypeName);
        if (null != newType) {
          context.branch();
          context.info("Assembling source for new type(s)...");
          newType.write();
          context.unbranch();

          final long now = System.currentTimeMillis();

          context.info("Finished writing new type in " + (now - started) + " millis.");
View Full Code Here

abstract public class ImageFactoryGenerator extends Generator {

  // @Override
  protected NewConcreteType assembleNewType(final Type type, final String newTypeName) {
    final Set<Method> methods = this.findMethods(type);
    final NewConcreteType generatedType = this.createType(type, newTypeName);
    final Set<String> prefetchUrls = this.implementMethods(generatedType, methods);
    this.overloadGetPreloadUrls(generatedType, prefetchUrls);
    return generatedType;
  }
View Full Code Here

  protected NewConcreteType createType(final Type type, final String newTypeName) {
    final GeneratorContext context = this.getGeneratorContext();
    context.branch();
    context.info(newTypeName);

    final NewConcreteType newType = context.newConcreteType(newTypeName);
    newType.setAbstract(false);
    newType.setFinal(true);

    final Type superType = this.getImageFactoryImpl();
    newType.setSuperType(superType);

    newType.addInterface(type);

    newType.setVisibility(Visibility.PUBLIC);

    context.debug("extends " + superType.getName());
    context.debug("implements: " + type.getName());
    context.debug("public");
    context.debug("final");
View Full Code Here

public class CometGenerator extends Generator {

  protected NewConcreteType assembleNewType(final Type cometClient, final String newTypeName) {
    this.verifyEnvironment();

    final NewConcreteType generated = this.subClassCometClient(newTypeName, cometClient);

    final Type serviceInterface = this.createRpcServiceInterface(generated);
    this.createRpcAsyncServiceInterface(generated);

    this.implementCreateGwtRpcProxy(generated, serviceInterface);
View Full Code Here

    context.branch();
    context.info(newTypeName);
    context.debug("extends " + cometClient.getName());
    context.debug("final");

    final NewConcreteType subClass = context.newConcreteType(newTypeName);
    subClass.setAbstract(false);
    subClass.setFinal(true);
    subClass.setSuperType(cometClient);

    context.unbranch();

    return subClass;
  }
View Full Code Here

    context.branch();

    this.verifyServiceInterface(serviceInterface);
    this.verifyAsyncServiceInterface(serviceInterface);

    final NewConcreteType client = this.createRpcServiceClient(newTypeName, serviceInterface, this.getJavaRpcServiceClient());
    this.implementPublicMethods(serviceInterface, client);

    context.unbranch();
    return client;
  }
View Full Code Here

  @Override
  protected NewConcreteType assembleNewType(final Type interfacee, final String newTypeName) {
    this.verifyImplementsHtmlTemplate(interfacee);

    final NewConcreteType newType = this.getGeneratorContext().newConcreteType(newTypeName);
    newType.setAbstract(false);
    newType.setFinal(true);
    newType.setSuperType(this.getHtmlTemplateFactoryImpl());
    newType.addInterface(interfacee);

    this.implementInterfaceMethods(interfacee, newType);

    return newType;
  }
View Full Code Here

TOP

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

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.