Package rocket.generator.rebind

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


   *            The name of the target logger.
   * @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());

View Full Code Here


  protected void overrideReadFieldsMethods(final NewConcreteType deserializer, final Type type) {
    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);
View Full Code Here

  protected void overrideWriteFieldsMethods(final NewConcreteType deserializer, final Type type) {
    Checker.notNull("parameter:deserializer", deserializer);
    Checker.notNull("parameter:type", type);

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

    final NewMethod writeFields = deserializer.newMethod();
    writeFields.setAbstract(false);
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
View Full Code Here

   *            The name for the new type
   * @return A new type
   */
  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);
View Full Code Here

    Checker.notNull("parameter:methods", methods);

    final Set<String> urls = new TreeSet<String>();

    final GeneratorContext context = this.getGeneratorContext();
    context.branch();
    context.info("Implementing abstract methods.");

    final TreeSet<Method> sortedMethods = new TreeSet<Method>(MethodComparator.INSTANCE);
    sortedMethods.addAll(methods);
    final Iterator<Method> iterator = sortedMethods.iterator();
View Full Code Here

    Checker.notNull("parameter:method", method);

    String prefetchUrl = null;

    final GeneratorContext context = this.getGeneratorContext();
    context.branch();
    context.info(method.getName());

    // get the filename
    final String resourceName = this.getImageName(method);
    context.debug(resourceName);
View Full Code Here

    Checker.notNull("parameter:newType", newType);
    Checker.notNull("parameter:preFetchUrls", preFetchUrls);

    final GeneratorContext context = this.getGeneratorContext();
    final String methodName = ImageFactoryConstants.GET_PRELOAD_URLS;
    context.branch();
    context.info("Overriding " + methodName + " to preload.");

    final Method method = newType.findMostDerivedMethod(methodName, Collections.<Type>emptyList());
    final NewMethod newMethod = method.copy(newType);
    newMethod.setAbstract(false);
View Full Code Here

   */
  protected Type createRpcServiceInterface(final NewConcreteType newType) {
    Checker.notNull("parameter:newType", newType);

    final GeneratorContext context = this.getGeneratorContext();
    context.branch();
    context.info("Generating Rpc service interface which will provide the payload serializer.");

    final NewNestedInterfaceType serviceInterface = newType.newNestedInterfaceType();
    serviceInterface.setNestedName(Constants.RPC_SERVICE_INTERFACE);
    serviceInterface.setStatic(true);
View Full Code Here

   */
  protected void createRpcAsyncServiceInterface(final NewConcreteType newType) {
    Checker.notNull("parameter:newType", newType);

    final GeneratorContext context = this.getGeneratorContext();
    context.branch();
    context.info("Generating Rpc async service interface counterpart for the rpc service interface.");

    final NewNestedInterfaceType asyncServiceInterface = newType.newNestedInterfaceType();
    asyncServiceInterface.setNestedName(Constants.RPC_ASYNC_SERVICE_INTERFACE);
    asyncServiceInterface.setStatic(true);
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.