コード例 #1
0
  private String toTypeUse(Type type) {
    String typeUse = null;

    if (type instanceof ArrayType) {
      ArrayType at = (ArrayType) type;
      typeUse = "";
      int dims = at.getDimensions();
      for (int i = 0; i < dims; i++) {
        typeUse = typeUse.concat("[]");
      }
    } // end if

    return typeUse;
  }
コード例 #2
0
  private DbOOAdt toAdt(Type type) throws DbException {
    DbOOAdt adt = null;

    if (type instanceof BasicType) {
      BasicType basicType = (BasicType) type;
      adt = toBasicAdt(basicType);
    } else if (type instanceof ObjectType) {
      ObjectType ot = (ObjectType) type;
      String classname = ot.getClassName();
      adt = toAdt(classname, ot);
    } else if (type instanceof ArrayType) {
      ArrayType at = (ArrayType) type;
      adt = toAdt(at.getBasicType());
    } else {
      // other cases?
    } // end if

    return adt;
  }
コード例 #3
0
 /**
  * Add a reference to an array class (e.g. String[][]) as needed by MULTIANEWARRAY instruction,
  * e.g. to the ConstantPool.
  *
  * @param type type of array class
  * @return index of entry
  */
 public int addArrayClass(ArrayType type) {
   return addClass_(type.getSignature());
 }