/** * Constructs a new <code>Type</code> with the given type name. * * @param typeName the name of this type; must not be <code>null</code>. */ public Type(String typeName) { if (typeName.startsWith("[]")) { _typeName = typeName; _typeClass = TypeClass.SEQUENCE; return; } for (int i = 0; i < __typeClassToTypeName.length; ++i) { if (__typeClassToTypeName[i].equals(typeName)) { _typeName = typeName; _typeClass = TypeClass.fromInt(i); return; } } int i = typeName.indexOf('<'); try { init( typeName, Class.forName(i < 0 ? typeName : typeName.substring(0, i)), false, i >= 0); } catch (ClassNotFoundException e) { throw new RuntimeException(e.toString()); } }
/** * Constructs a new <code>Type</code> with the given type name. * * @param typeName the name of this type; must not be <code>null</code>. */ public Type(String typeName) { if (typeName.startsWith("[]")) { _typeName = typeName; _typeClass = TypeClass.SEQUENCE; return; } for (int i = 0; i < __typeClassToTypeName.length; ++i) { if (__typeClassToTypeName[i].equals(typeName)) { _typeName = typeName; _typeClass = TypeClass.fromInt(i); return; } } int i = typeName.indexOf('<'); try { init( typeName, Class.forName(i < 0 ? typeName : typeName.substring(0, i)), false, i >= 0, false); } catch (ClassNotFoundException e) { throw new RuntimeException(e); } }
public TypeDescription readType() { int b = read8Bit(); TypeClass typeClass = TypeClass.fromInt(b & 0x7F); if (typeClass == null) { throw new RuntimeException(
public TypeDescription readType() { int b = read8Bit(); TypeClass typeClass = TypeClass.fromInt(b & 0x7F); if (TypeDescription.isTypeClassSimple(typeClass)) { return TypeDescription.getTypeDescription(typeClass); } else { int index = read16Bit(); TypeDescription type = null; if ((b & 0x80) != 0) { try { type = TypeDescription.getTypeDescription( readStringValue()); } catch (ClassNotFoundException e) { throw new RuntimeException(e.toString()); } } if (index != 0xFFFF) { if ((b & 0x80) == 0) { type = typeCache[index]; } else { typeCache[index] = type; } } return type; } }