/** * Constructs a new <code>Type</code> with the given type class. * * @param typeClass the type class of this type; must not be * <code>null</code>. Only type classes for simple types are allowed * here. * * @throws IllegalArgumentException if the given <code>typeClass</code> is * not simple (for example, a struct or an interface type). This * constructor could not find out the type name in such a case. */ public Type(TypeClass typeClass) { if(__isTypeClassPrimitive(typeClass)) { _typeClass = typeClass; _typeName = __typeClassToTypeName[typeClass.getValue()]; } else throw new IllegalArgumentException(typeClass + " is not primitive"); }
/** * Constructs a new <code>Type</code> with the given type class. * * @param typeClass the type class of this type; must not be * <code>null</code>. Only type classes for simple types are allowed * here. * * @throws IllegalArgumentException if the given <code>typeClass</code> is * not simple (for example, a struct or an interface type). This * constructor could not find out the type name in such a case. */ public Type(TypeClass typeClass) { if(__isTypeClassPrimitive(typeClass)) { _typeClass = typeClass; _typeName = __typeClassToTypeName[typeClass.getValue()]; } else throw new IllegalArgumentException(typeClass + " is not primitive"); }