Package gw.internal.gosu.dynamic
Class DynamicType
- java.lang.Object
-
- gw.lang.reflect.AbstractType
-
- gw.lang.reflect.TypeBase
-
- gw.internal.gosu.dynamic.DynamicType
-
- All Implemented Interfaces:
IDynamicType
,IPlaceholder
,IType
,Serializable
public class DynamicType extends TypeBase implements IDynamicType
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class gw.lang.reflect.TypeBase
_arrayComponentClass
-
Fields inherited from interface gw.lang.reflect.IDynamicType
PKG, QNAME, RNAME
-
Fields inherited from interface gw.lang.reflect.IPlaceholder
UNHANDLED
-
Fields inherited from interface gw.lang.reflect.IType
EMPTY_ARRAY, EMPTY_TYPE_ARRAY, EMPTY_TYPE_LIST
-
-
Constructor Summary
Constructors Constructor Description DynamicType(DynamicTypeLoader typeLoader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IType
getComponentType()
If this is an array type, a type representing the component type of the array.IType[]
getInterfaces()
String
getName()
The fully qualified name of this intrinsic type.String
getNamespace()
The namespace for this class.String
getRelativeName()
The relative or unqualified name.IType
getSupertype()
Returns the type representing the supertype of this type.ITypeInfo
getTypeInfo()
Get the type information for this intrinsic type.ITypeLoader
getTypeLoader()
Returns the type loader responsible for loading this intrinsic type.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
isFinal()
True if this type cannot be extended.boolean
isPlaceholder()
-
Methods inherited from class gw.lang.reflect.TypeBase
getAllClassesInClassHierarchyAsIntrinsicTypes, getAllTypesInHierarchy, getArrayComponent, getArrayComponentClass, getArrayLength, getArrayType, getArrayVersionsOfEachType, getCompoundTypeComponents, getDisplayName, getEnclosingType, getGenericType, getGenericTypeVariables, getModifiers, getParameterizedType, getTypeParameters, isAbstract, isArray, isCompoundType, isDiscarded, isEnum, isGenericType, isInterface, isMutable, isParameterizedType, isPrimitive, isValid, loadAllTypesInHierarchy, loadJavaType, makeArrayInstance, makeArrayType, readResolve, setArrayComponent, setDiscarded, toString, unloadTypeInfo
-
Methods inherited from class gw.lang.reflect.AbstractType
getLiteralMetaType, getMetaType, getTheRef
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface gw.lang.reflect.IType
compile, getAllTypesInHierarchy, getArrayComponent, getArrayLength, getArrayType, getCompoundTypeComponents, getDisplayName, getEnclosingType, getFunctionalInterface, getGenericType, getGenericTypeVariables, getLiteralMetaType, getMetaType, getModifiers, getParameterizedType, getSourceFiles, getTypeParameters, isAbstract, isArray, isCompilable, isCompoundType, isDiscarded, isDynamic, isEnum, isGenericType, isInterface, isMutable, isParameterizedType, isPrimitive, isValid, makeArrayInstance, readResolve, setArrayComponent, setDiscarded, unloadTypeInfo
-
-
-
-
Constructor Detail
-
DynamicType
public DynamicType(DynamicTypeLoader typeLoader)
-
-
Method Detail
-
isPlaceholder
public boolean isPlaceholder()
- Specified by:
isPlaceholder
in interfaceIPlaceholder
-
isFinal
public boolean isFinal()
Description copied from interface:IType
True if this type cannot be extended.
-
getName
public String getName()
Description copied from interface:IType
The fully qualified name of this intrinsic type.
-
getRelativeName
public String getRelativeName()
Description copied from interface:IType
The relative or unqualified name. For a class this should be just the class name without the package name.- Specified by:
getRelativeName
in interfaceIType
-
getNamespace
public String getNamespace()
Description copied from interface:IType
The namespace for this class. For a java class this will be the package, while for other types of intrinsic types it could be another logical name.- Specified by:
getNamespace
in interfaceIType
-
getTypeLoader
public ITypeLoader getTypeLoader()
Description copied from interface:IType
Returns the type loader responsible for loading this intrinsic type.- Specified by:
getTypeLoader
in interfaceIType
-
getSupertype
public IType getSupertype()
Description copied from interface:IType
Returns the type representing the supertype of this type. Returns null if this type has no supertype.- Specified by:
getSupertype
in interfaceIType
-
getInterfaces
public IType[] getInterfaces()
- Specified by:
getInterfaces
in interfaceIType
- Returns:
- If this is a class, returns a list of all the interfaces this type implements. Similarly, if this is an interface, returns a list of all the interfaces this type extends. In any case, returns an empty list if this type neither implements nor extends interfaces.
-
getTypeInfo
public ITypeInfo getTypeInfo()
Description copied from interface:IType
Get the type information for this intrinsic type.- Specified by:
getTypeInfo
in interfaceIType
- See Also:
ITypeInfo
-
getComponentType
public IType getComponentType()
Description copied from interface:IType
If this is an array type, a type representing the component type of the array. Otherwise null.- Specified by:
getComponentType
in interfaceIType
- Overrides:
getComponentType
in classTypeBase
-
isAssignableFrom
public boolean isAssignableFrom(IType type)
Description copied from interface:IType
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.- Specified by:
isAssignableFrom
in interfaceIType
- Overrides:
isAssignableFrom
in classTypeBase
-
-