public class DefaultArrayType extends AbstractType implements IDefaultArrayType, IHasJavaClass
| Modifier and Type | Field and Description |
|---|---|
static LocklessLazyVar<List<IJavaType>> |
INTERFACES |
EMPTY_ARRAY, EMPTY_TYPE_ARRAY, EMPTY_TYPE_LIST| Constructor and Description |
|---|
DefaultArrayType(IType componentType,
IJavaClassInfo componentConcreteClass,
ITypeLoader typeLoader) |
| Modifier and Type | Method and Description |
|---|---|
Set |
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.
|
int |
getArrayLength(Object array)
Returns the length of the specified array object.
|
IDefaultArrayType |
getArrayType()
Make an array type from this type.
|
Class |
getBackingClass() |
IType |
getComponentType()
If this is an array type, a type representing the component type of the
array.
|
Set<IType> |
getCompoundTypeComponents() |
IJavaClassInfo |
getConcreteClass() |
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.
|
IType[] |
getInterfaces() |
int |
getModifiers()
Returns the modifiers for this type, encoded in an integer.
|
String |
getName()
The fully qualified name of this intrinsic type.
|
String |
getNamespace()
The namespace for this class.
|
IType |
getParameterizedType(IType... ofType)
Assuming this intrinsic type is a Generic type, return the parameterized
type associated with the given list of type parameters.
|
String |
getRelativeName()
The relative or unqualified name.
|
IType |
getSupertype()
Returns the type representing the supertype of this type.
|
IDefaultArrayType |
getThisRef() |
ITypeInfo |
getTypeInfo()
Get the type information for this intrinsic type.
|
ITypeLoader |
getTypeLoader()
Returns the type loader responsible for loading this intrinsic type.
|
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.
|
Object |
makeArrayInstance(int iLength)
Construct an array instance of specified length.
|
protected IDefaultArrayType |
makeArrayType()
Allows subclasses to return a more specific interfaces
|
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, waitgetLiteralMetaType, getMetaTypepublic static final LocklessLazyVar<List<IJavaType>> INTERFACES
public DefaultArrayType(IType componentType, IJavaClassInfo componentConcreteClass, ITypeLoader typeLoader)
public final IType getComponentType()
ITypegetComponentType in interface ITypepublic final String getRelativeName()
ITypegetRelativeName in interface ITypepublic final boolean isArray()
ITypepublic final Object readResolve()
ITypereadResolve in interface ITypepublic final 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 final boolean isAbstract()
isAbstract in interface ITypepublic final String getName()
ITypepublic final 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 final String getNamespace()
ITypegetNamespace in interface ITypepublic final ITypeLoader getTypeLoader()
ITypegetTypeLoader in interface ITypepublic final IType getSupertype()
ITypegetSupertype in interface ITypepublic final IType getEnclosingType()
ITypegetEnclosingType in interface ITypepublic final IType getGenericType()
ITypegetGenericType in interface ITypepublic final boolean isFinal()
ITypepublic final boolean isInterface()
ITypeisInterface in interface ITypepublic boolean isEnum()
ITypepublic final IType[] getInterfaces()
getInterfaces in interface ITypepublic final boolean isParameterizedType()
ITypeisParameterizedType in interface ITypepublic final boolean isGenericType()
ITypeisGenericType in interface ITypeIType.isParameterizedType()public final IGenericTypeVariable[] getGenericTypeVariables()
ITypegetGenericTypeVariables in interface ITypepublic final IType[] getTypeParameters()
ITypegetTypeParameters in interface ITypepublic final IType getParameterizedType(IType... ofType)
ITypegetParameterizedType in interface ITypeofType - The type parameters.public final Set getAllTypesInHierarchy()
ITypegetAllTypesInHierarchy in interface ITypepublic final boolean isPrimitive()
ITypeisPrimitive in interface ITypepublic final IDefaultArrayType getArrayType()
ITypegetArrayType in interface ITypeprotected IDefaultArrayType makeArrayType()
public Object makeArrayInstance(int iLength)
ITypemakeArrayInstance in interface ITypepublic IJavaClassInfo getConcreteClass()
getConcreteClass in interface IDefaultArrayTypepublic 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 boolean isAssignableFrom(IType type)
ITypeisAssignableFrom in interface ITypepublic boolean isMutable()
ITypepublic final ITypeInfo getTypeInfo()
ITypegetTypeInfo in interface ITypeITypeInfopublic final void unloadTypeInfo()
ITypeunloadTypeInfo in interface ITypepublic IDefaultArrayType getThisRef()
public 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 ITypepublic Class getBackingClass()
getBackingClass in interface IHasJavaClassCopyright © 2015. All rights reserved.