public abstract class TypeBase extends AbstractType implements IType
| Modifier and Type | Field and Description |
|---|---|
protected IJavaClassInfo |
_arrayComponentClass |
EMPTY_ARRAY, EMPTY_TYPE_ARRAY, EMPTY_TYPE_LIST| Modifier | Constructor and Description |
|---|---|
protected |
TypeBase() |
protected |
TypeBase(Class<?> arrayComponentClass) |
protected |
TypeBase(IJavaClassInfo arrayComponentClass) |
| Modifier and Type | Method and Description |
|---|---|
protected static Set<IType> |
getAllClassesInClassHierarchyAsIntrinsicTypes(IType type) |
Set<? extends IType> |
getAllTypesInHierarchy()
Returns a Set of all IIntrinsicTypes that this class is assignable from,
including this class.
|
Object |
getArrayComponent(Object array,
int iIndex)
Returns the value of the indexed component in the specified
array object.
|
protected IJavaClassInfo |
getArrayComponentClass() |
int |
getArrayLength(Object array)
Returns the length of the specified array object.
|
IType |
getArrayType()
Make an array type from this type.
|
protected Set<IType> |
getArrayVersionsOfEachType(Set<? extends IType> componentTypes) |
IType |
getComponentType()
If this is an array type, a type representing the component type of the
array.
|
Set<IType> |
getCompoundTypeComponents() |
String |
getDisplayName()
The display name of this intrinsic type.
|
IType |
getEnclosingType()
Returns the type immediately enclosing this type.
|
IType |
getGenericType()
If this is a parameterized type, returns the generic type this type
parameterizes.
|
IGenericTypeVariable[] |
getGenericTypeVariables()
Returns an array of GenericTypeVariables declared with this Generic Type.
|
int |
getModifiers()
Returns the modifiers for this type, encoded in an integer.
|
IType |
getParameterizedType(IType... ofType)
Assuming this intrinsic type is a Generic type, return the parameterized
type associated with the given list of type parameters.
|
IType[] |
getTypeParameters()
If this is a parameterized type, returns the specific types used to create
this type, null otherwies.
|
boolean |
isAbstract() |
boolean |
isArray()
True if this is an array.
|
boolean |
isAssignableFrom(IType type)
Determines if the type represented by this intrinsic type is either the
same as, or is a super-type of the type represented by the specified type
parameter.
|
boolean |
isCompoundType() |
boolean |
isDiscarded()
True if this type has been replaced with a newer version of the same name in the type system.
|
boolean |
isEnum()
Returns true if this type is an enumeration.
|
boolean |
isFinal()
True if this type cannot be extended.
|
boolean |
isGenericType()
Returns true if this ia a Generic Type.
|
boolean |
isInterface()
Returns true if this type is an interface.
|
boolean |
isMutable()
Are intances of this type mutable? Note sometimes it's difficult to
determine.
|
boolean |
isParameterizedType()
Returns true if this ia a Parameterized Type.
|
boolean |
isPrimitive()
True if this type represents a primitive type e.g., Java int, char, etc.
|
boolean |
isValid()
Defines this type if it is not yet fully defined.
|
protected Set<? extends IType> |
loadAllTypesInHierarchy() |
IJavaType |
loadJavaType(String fullyQualifiedName) |
Object |
makeArrayInstance(int iLength)
Construct an array instance of specified length.
|
protected IType |
makeArrayType() |
Object |
readResolve()
IType requires this method be implemented to ensure IType
instances can be centrally defined and cached.
|
void |
setArrayComponent(Object array,
int iIndex,
Object value)
Sets the value of the indexed component in the specified array object.
|
void |
setDiscarded(boolean bDiscarded) |
String |
toString() |
void |
unloadTypeInfo()
Unload or nullify any references to this IType's ITypeInfo.
|
getLiteralMetaType, getMetaType, getTheRefclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetInterfaces, getLiteralMetaType, getMetaType, getName, getNamespace, getRelativeName, getSourceFiles, getSupertype, getTypeInfo, getTypeLoader, isDynamicprotected final transient IJavaClassInfo _arrayComponentClass
protected TypeBase(IJavaClassInfo arrayComponentClass)
protected TypeBase(Class<?> arrayComponentClass)
protected TypeBase()
protected IType makeArrayType()
public IType getEnclosingType()
ITypegetEnclosingType in interface ITypepublic IType getGenericType()
ITypegetGenericType in interface ITypepublic boolean isFinal()
ITypepublic boolean isInterface()
ITypeisInterface in interface ITypepublic boolean isEnum()
ITypepublic boolean isParameterizedType()
ITypeisParameterizedType in interface ITypepublic boolean isGenericType()
ITypeisGenericType in interface ITypeIType.isParameterizedType()public IGenericTypeVariable[] getGenericTypeVariables()
ITypegetGenericTypeVariables in interface ITypepublic IType getParameterizedType(IType... ofType)
ITypegetParameterizedType in interface ITypeofType - The type parameters.public IType[] getTypeParameters()
ITypegetTypeParameters in interface ITypepublic boolean isArray()
ITypepublic boolean isPrimitive()
ITypeisPrimitive in interface ITypepublic Object getArrayComponent(Object array, int iIndex) throws IllegalArgumentException, ArrayIndexOutOfBoundsException
ITypegetArrayComponent in interface ITypearray - An array instance of this intrinsic type.iIndex - The index of the component to get.IllegalArgumentException - If the specified object is not an array.ArrayIndexOutOfBoundsException - If the specified index argument
is negative, or if it is greater than or equal to the length of the
specified arraypublic void setArrayComponent(Object array, int iIndex, Object value) throws IllegalArgumentException, ArrayIndexOutOfBoundsException
ITypesetArrayComponent in interface ITypearray - An array instance of this intrinsic type.iIndex - The index of the component to set.value - The new value of the indexed component.IllegalArgumentException - If the specified object is not an array.ArrayIndexOutOfBoundsException - If the specified index argument
is negative, or if it is greater than or equal to the length of the
specified arraypublic int getArrayLength(Object array) throws IllegalArgumentException
ITypegetArrayLength in interface ITypearray - An array instance of this intrinsic type.IllegalArgumentException - If the object argument is not an array.public IType getComponentType()
ITypegetComponentType in interface ITypepublic boolean isMutable()
ITypepublic Object readResolve() throws ObjectStreamException
ITypereadResolve in interface ITypeObjectStreamExceptionpublic boolean isValid()
ITypepublic int getModifiers()
ITypepublic, protected,
private, final, static,
abstract they should be decoded
using the methods of class Modifier.getModifiers in interface ITypeModifierpublic boolean isAbstract()
isAbstract in interface ITypepublic String getDisplayName()
ITypeIType.getName(), but in some cases a type may want to modify it's name
for presentation to the user.getDisplayName in interface ITypepublic Set<? extends IType> getAllTypesInHierarchy()
ITypegetAllTypesInHierarchy in interface ITypeprotected static Set<IType> getAllClassesInClassHierarchyAsIntrinsicTypes(IType type)
protected Set<IType> getArrayVersionsOfEachType(Set<? extends IType> componentTypes)
public boolean isAssignableFrom(IType type)
ITypeisAssignableFrom in interface ITypepublic IType getArrayType()
ITypegetArrayType in interface ITypepublic Object makeArrayInstance(int iLength)
ITypemakeArrayInstance in interface ITypeprotected IJavaClassInfo getArrayComponentClass()
public void unloadTypeInfo()
ITypeunloadTypeInfo in interface ITypepublic boolean isDiscarded()
ITypeisDiscarded in interface ITypepublic void setDiscarded(boolean bDiscarded)
setDiscarded in interface ITypepublic boolean isCompoundType()
isCompoundType in interface ITypepublic Set<IType> getCompoundTypeComponents()
getCompoundTypeComponents in interface ITypeCopyright © 2022. All rights reserved.