Package rocket.generator.rebind.type

Examples of rocket.generator.rebind.type.Type


  private final static String OBJECT = Object.class.getName();

  public void start(final Type type) {
    Checker.notNull("type:type", type);

    Type type0 = type;
    if (this.skipInitialType()) {
      type0 = type.getSuperType();
    }

    while (true) {
      if (null == type0) {
        break;
      }

      if (this.visit(type0)) {
        break;
      }

      if (type0.getName().equals(OBJECT)) {
        break;
      }

      type0 = type0.getSuperType();
    }
  }
View Full Code Here


   * @return
   */
  public Type findType(final String name) {
    Checker.notEmpty("parameter:name", name);

    Type type = null;
    while (true) {
      // check cache first...
      type = (Type) this.getTypes().get(name);
      if (null != type) {
        break;
View Full Code Here

    return type;
  }

  protected Type getNewType(final String name) {
    Type type = null;

    final Iterator<NewType> newTypes = this.getNewTypes().iterator();
    while (newTypes.hasNext()) {
      final NewType newType = newTypes.next();
      if (false == newType.hasName()) {
View Full Code Here

    return type;
  }

  public Type getType(final String name) {
    final Type type = this.findType(name);
    if (null == type) {
      throw new TypeNotFoundException("Unable to find type \"" + name + "\".");
    }
    return type;
  }
View Full Code Here

    final List<Type> superTypes = this.accumulateSuperTypes(type);

    final Iterator<Type> iterator = superTypes.iterator();
    boolean first = true;
    while (iterator.hasNext()) {
      final Type visit = (Type) iterator.next();

      if (first && this.skipInitialType()) {
        first = false;
        continue;
      }
View Full Code Here

  protected List<Type> accumulateSuperTypes(final Type type) {
    Checker.notNull("parameter:type", type);

    final List<Type> types = new LinkedList<Type>();

    Type type0 = type;

    while (true) {
      if (null == type0) {
        break;
      }

      // insert at the front of the list this builds a reversed list.
      types.add(0, type0);

      if (type0.getName().equals(OBJECT)) {
        break;
      }

      type0 = type0.getSuperType();
    }

    return types;
  }
View Full Code Here

  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);
    return generated;
  }
View Full Code Here

    newMethod.setAbstract(true);
    newMethod.setFinal(false);
    newMethod.setName(Constants.PAYLOAD_DECLARATION_METHOD);
    newMethod.setNative(false);

    final Type payloadType = this.getPayloadType(newType.getSuperType());
    newMethod.setReturnType(payloadType);

    newMethod.setStatic(false);
    newMethod.setVisibility(Visibility.PUBLIC);
View Full Code Here

    final String typeName = (String) values.get(0);
    if (null == typeName) {
      this.throwUnableToFindCometPayloadTypeAnnotation(type);
    }

    final Type payloadType = context.findType(typeName);
    if (payloadType == null) {
      this.throwUnableToFindPayloadType(typeName);
    }
    return payloadType;
  }
View Full Code Here

      @Override
      protected boolean skipAbstractTypes() {
        return true;
      }
    };
    final Type readerOrWriterInterface = this.getImplementingInterface();
    visitor.start(readerOrWriterInterface);

    return this.finalizeBindings(accumulator);
  }
View Full Code Here

TOP

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

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.