/** * Constructs a new <code>Type</code> from the given * <code>java.lang.Class</code>. * * <p>This is equivalent to <code>Type(zClass, false)</code>.</p> * * @param zClass the Java class of this type. Must not be * <code>null</code>. */ public Type(Class zClass) { init(null, zClass, false, false); }
/** * Constructs a new <code>Type</code> which defaults to <code>VOID</code>. */ public Type() { init(null, void.class, false, false); }
/** * Constructs a new <code>Type</code> which defaults to <code>VOID</code>. */ public Type() { init(null, void.class, false, false, false); }
/** * Constructs a new <code>Type</code> from the given * <code>java.lang.Class</code>. * * <p>This is equivalent to <code>Type(zClass, false)</code>.</p> * * @param zClass the Java class of this type. Must not be * <code>null</code>. */ public Type(Class<?> zClass) { init(null, zClass, false, false, false); }
private Type( Class<?> zClass, boolean alternative, boolean sequenceComponentType) { init(null, zClass, alternative, false, sequenceComponentType); }
init(null, zClass, alternative, false, false);
init(null, zClass, alternative, false);
/** * 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); } }