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,java.io.Serializable
public class DynamicType extends TypeBase implements IDynamicType
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private LockingLazyVar<DynamicTypeInfo>_typeInfoprivate DynamicTypeLoader_typeLoaderprivate ITypeRef_typeRef-
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 ITypegetComponentType()If this is an array type, a type representing the component type of the array.IType[]getInterfaces()java.lang.StringgetName()The fully qualified name of this intrinsic type.java.lang.StringgetNamespace()The namespace for this class.(package private) ITypeRefgetOrCreateTypeReference()java.lang.StringgetRelativeName()The relative or unqualified name.ITypegetSupertype()Returns the type representing the supertype of this type.ITypeInfogetTypeInfo()Get the type information for this intrinsic type.ITypeLoadergetTypeLoader()Returns the type loader responsible for loading this intrinsic type.booleanisAssignableFrom(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.booleanisFinal()True if this type cannot be extended.booleanisPlaceholder()-
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
-
-
-
-
Field Detail
-
_typeLoader
private DynamicTypeLoader _typeLoader
-
_typeInfo
private LockingLazyVar<DynamicTypeInfo> _typeInfo
-
_typeRef
private ITypeRef _typeRef
-
-
Constructor Detail
-
DynamicType
public DynamicType(DynamicTypeLoader typeLoader)
-
-
Method Detail
-
isPlaceholder
public boolean isPlaceholder()
- Specified by:
isPlaceholderin interfaceIPlaceholder
-
isFinal
public boolean isFinal()
Description copied from interface:ITypeTrue if this type cannot be extended.
-
getName
public java.lang.String getName()
Description copied from interface:ITypeThe fully qualified name of this intrinsic type.
-
getRelativeName
public java.lang.String getRelativeName()
Description copied from interface:ITypeThe relative or unqualified name. For a class this should be just the class name without the package name.- Specified by:
getRelativeNamein interfaceIType
-
getNamespace
public java.lang.String getNamespace()
Description copied from interface:ITypeThe 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:
getNamespacein interfaceIType
-
getTypeLoader
public ITypeLoader getTypeLoader()
Description copied from interface:ITypeReturns the type loader responsible for loading this intrinsic type.- Specified by:
getTypeLoaderin interfaceIType
-
getSupertype
public IType getSupertype()
Description copied from interface:ITypeReturns the type representing the supertype of this type. Returns null if this type has no supertype.- Specified by:
getSupertypein interfaceIType
-
getInterfaces
public IType[] getInterfaces()
- Specified by:
getInterfacesin 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:ITypeGet the type information for this intrinsic type.- Specified by:
getTypeInfoin interfaceIType- See Also:
ITypeInfo
-
getComponentType
public IType getComponentType()
Description copied from interface:ITypeIf this is an array type, a type representing the component type of the array. Otherwise null.- Specified by:
getComponentTypein interfaceIType- Overrides:
getComponentTypein classTypeBase
-
isAssignableFrom
public boolean isAssignableFrom(IType type)
Description copied from interface:ITypeDetermines 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:
isAssignableFromin interfaceIType- Overrides:
isAssignableFromin classTypeBase
-
getOrCreateTypeReference
ITypeRef getOrCreateTypeReference()
-
-