Package gw.internal.gosu.parser
Class AbstractTypeRef
- java.lang.Object
-
- gw.lang.reflect.ITypeRef
-
- gw.internal.gosu.parser.AbstractTypeRef
-
- All Implemented Interfaces:
IType
,Serializable
public abstract class AbstractTypeRef extends ITypeRef implements Serializable
This is what the proxy methods look like.public ITypeLoader getTypeLoader() { _reload(); IType itype; try { itype = (IType) _getType(); } catch (ClassCastException classcastexception) { throw new RuntimeException((new StringBuilder("Type interface changed. Expected gw.internal.gosu.parser.IGosuClassInternal for ")).append(_getTypeNameInternal()).toString(), classcastexception); } return (ITypeLoader) itype.getTypeLoader(); }
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected IType
_type
-
Fields inherited from interface gw.lang.reflect.IType
EMPTY_ARRAY, EMPTY_TYPE_ARRAY, EMPTY_TYPE_LIST
-
-
Constructor Summary
Constructors Constructor Description AbstractTypeRef()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Class<? extends IType>
_getClassOfRef()
int
_getIndexForSortingFast(String key)
protected IType
_getType()
String
_getTypeName()
String
_getTypeNameInternal()
This method is called reflectively.String
_getTypeNameLong()
protected void
_reload()
void
_setStale(RefreshKind refreshKind)
boolean
_shouldReload()
boolean
equals(Object obj)
IModule
getModule()
ITypeLoader
getTypeLoaderDirectly()
int
hashCode()
boolean
isDeleted()
boolean
isDiscarded()
True if this type has been replaced with a newer version of the same name in the type system.boolean
isReloadable()
boolean
isStale()
boolean
isTypeRefreshedOutsideOfLock(IType type)
Object
readResolve()
IType requires this method be implemented to ensure IType instances can be centrally defined and cached.void
setDiscarded(boolean bDiscarded)
void
setReloadable(boolean bReloadable)
String
toString()
void
unloadTypeInfo()
Unload or nullify any references to this IType's ITypeInfo.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface gw.lang.reflect.IType
compile, getAllTypesInHierarchy, getArrayComponent, getArrayLength, getArrayType, getComponentType, getCompoundTypeComponents, getDisplayName, getEnclosingType, getFunctionalInterface, getGenericType, getGenericTypeVariables, getInterfaces, getLiteralMetaType, getMetaType, getModifiers, getName, getNamespace, getParameterizedType, getRelativeName, getSourceFiles, getSupertype, getTypeInfo, getTypeLoader, getTypeParameters, isAbstract, isArray, isAssignableFrom, isCompilable, isCompoundType, isDynamic, isEnum, isFinal, isGenericType, isInterface, isMutable, isParameterizedType, isPrimitive, isValid, makeArrayInstance, setArrayComponent
-
-
-
-
Field Detail
-
_type
protected transient volatile IType _type
-
-
Method Detail
-
readResolve
public Object readResolve() throws ObjectStreamException
Description copied from interface:IType
IType requires this method be implemented to ensure IType instances can be centrally defined and cached.- Specified by:
readResolve
in interfaceIType
- Throws:
ObjectStreamException
-
isStale
public final boolean isStale()
-
isReloadable
public boolean isReloadable()
- Specified by:
isReloadable
in classITypeRef
-
setReloadable
public void setReloadable(boolean bReloadable)
- Specified by:
setReloadable
in classITypeRef
-
getModule
public IModule getModule()
-
getTypeLoaderDirectly
public ITypeLoader getTypeLoaderDirectly()
- Specified by:
getTypeLoaderDirectly
in classITypeRef
-
_setStale
public void _setStale(RefreshKind refreshKind)
-
unloadTypeInfo
public void unloadTypeInfo()
Description copied from interface:IType
Unload or nullify any references to this IType's ITypeInfo.- Specified by:
unloadTypeInfo
in interfaceIType
-
_shouldReload
public boolean _shouldReload()
- Specified by:
_shouldReload
in classITypeRef
-
_getType
protected final IType _getType()
-
_getClassOfRef
public Class<? extends IType> _getClassOfRef()
- Specified by:
_getClassOfRef
in classITypeRef
-
_reload
protected final void _reload()
-
_getTypeName
public String _getTypeName()
-
_getTypeNameLong
public String _getTypeNameLong()
-
_getIndexForSortingFast
public int _getIndexForSortingFast(String key)
-
isDiscarded
public boolean isDiscarded()
Description copied from interface:IType
True if this type has been replaced with a newer version of the same name in the type system.- Specified by:
isDiscarded
in interfaceIType
-
setDiscarded
public void setDiscarded(boolean bDiscarded)
- Specified by:
setDiscarded
in interfaceIType
-
_getTypeNameInternal
public String _getTypeNameInternal()
This method is called reflectively.
-
isTypeRefreshedOutsideOfLock
public boolean isTypeRefreshedOutsideOfLock(IType type)
- Specified by:
isTypeRefreshedOutsideOfLock
in classITypeRef
-
-