Ejemplo n.º 1
0
  public TypeClassInfo createBasicClassInfo(Class typeClass) {
    TypeClassInfo info = new TypeClassInfo();
    info.setDescription("class '" + typeClass.getName() + '\'');
    info.setTypeClass(typeClass);

    return info;
  }
Ejemplo n.º 2
0
  protected Type createHolderType(TypeClassInfo info) {
    if (info.getGenericType() == null) {
      throw new UnsupportedOperationException(
          "To use holder types " + "you must have an XML descriptor declaring the component type.");
    }

    Class heldCls = (Class) info.getGenericType();
    info.setTypeClass(heldCls);

    Type delegate = createType(heldCls);
    HolderType type = new HolderType(delegate);
    return type;
  }