@Override
  public JType visit(ReferenceType type, JCodeModel codeModel) {
    final JType referencedType = type.getType().accept(this, codeModel);

    JType referencedTypeArray = referencedType;
    for (int index = 0; index < type.getArrayCount(); index++) {
      referencedTypeArray = referencedTypeArray.array();
    }
    return referencedTypeArray;
  }
示例#2
0
  public JType getTypeClass() {
    CAdapter a = typeUse.getAdapterUse();
    NType nt;
    if (a != null) nt = a.customType;
    else nt = typeUse.getInfo().getType();

    JType jt = nt.toType(outline, EXPOSED);

    JPrimitiveType prim = jt.boxify().getPrimitiveType();
    if (!typeUse.isCollection() && prim != null) jt = prim;

    if (typeUse.isCollection()) jt = jt.array();

    return jt;
  }