Package gw.internal.gosu.parser
Class AbstractTypeRef
- java.lang.Object
-
- gw.lang.reflect.ITypeRef
-
- gw.internal.gosu.parser.AbstractTypeRef
-
- All Implemented Interfaces:
IType,java.io.Serializable
public abstract class AbstractTypeRef extends ITypeRef implements java.io.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 private boolean_bParameterizedprivate boolean_bReloadableprivate boolean_bReloadingprivate boolean_bStaleprivate IType_componentTypeprivate boolean_deletedprivate int_hashCodeprivate ITypeLoader_loaderprivate int_mdChecksumprivate IModule_moduleprivate java.lang.String_pureGenericTypeNameprotected IType_typeprivate java.lang.String_typeNameprivate IType[]_typeParameters-
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 java.lang.Class<? extends IType>_getClassOfRef()int_getIndexForSortingFast(java.lang.String key)protected IType_getType()java.lang.String_getTypeName()java.lang.String_getTypeNameInternal()This method is called reflectively.java.lang.String_getTypeNameLong()protected void_reload()private void_resolveType()void_setStale(RefreshKind refreshKind)(package private) void_setType(IType type)boolean_shouldReload()private voidcheckNotDeleted()booleanequals(java.lang.Object obj)IModulegetModule()ITypeLoadergetTypeLoaderDirectly()inthashCode()booleanisDeleted()booleanisDiscarded()True if this type has been replaced with a newer version of the same name in the type system.booleanisReloadable()booleanisStale()booleanisTypeRefreshedOutsideOfLock(IType type)private voidreadObject(java.io.ObjectInputStream in)java.lang.ObjectreadResolve()IType requires this method be implemented to ensure IType instances can be centrally defined and cached.voidsetDiscarded(boolean bDiscarded)voidsetReloadable(boolean bReloadable)java.lang.StringtoString()voidunloadTypeInfo()Unload or nullify any references to this IType's ITypeInfo.private voidwriteObject(java.io.ObjectOutputStream os)-
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
-
_typeName
private transient java.lang.String _typeName
-
_type
protected transient volatile IType _type
-
_module
private transient IModule _module
-
_loader
private transient ITypeLoader _loader
-
_pureGenericTypeName
private transient java.lang.String _pureGenericTypeName
-
_componentType
private transient IType _componentType
-
_typeParameters
private transient IType[] _typeParameters
-
_bParameterized
private transient boolean _bParameterized
-
_mdChecksum
private transient int _mdChecksum
-
_hashCode
private transient volatile int _hashCode
-
_bStale
private transient volatile boolean _bStale
-
_bReloading
private transient volatile boolean _bReloading
-
_deleted
private transient boolean _deleted
-
_bReloadable
private transient boolean _bReloadable
-
-
Method Detail
-
writeObject
private void writeObject(java.io.ObjectOutputStream os) throws java.io.IOException- Throws:
java.io.IOException
-
readObject
private void readObject(java.io.ObjectInputStream in) throws java.lang.ClassNotFoundException, java.io.IOException- Throws:
java.lang.ClassNotFoundExceptionjava.io.IOException
-
readResolve
public java.lang.Object readResolve() throws java.io.ObjectStreamExceptionDescription copied from interface:ITypeIType requires this method be implemented to ensure IType instances can be centrally defined and cached.- Specified by:
readResolvein interfaceIType- Throws:
java.io.ObjectStreamException
-
_setType
void _setType(IType type)
-
isStale
public final boolean isStale()
-
isReloadable
public boolean isReloadable()
- Specified by:
isReloadablein classITypeRef
-
setReloadable
public void setReloadable(boolean bReloadable)
- Specified by:
setReloadablein classITypeRef
-
getModule
public IModule getModule()
-
getTypeLoaderDirectly
public ITypeLoader getTypeLoaderDirectly()
- Specified by:
getTypeLoaderDirectlyin classITypeRef
-
_setStale
public void _setStale(RefreshKind refreshKind)
-
unloadTypeInfo
public void unloadTypeInfo()
Description copied from interface:ITypeUnload or nullify any references to this IType's ITypeInfo.- Specified by:
unloadTypeInfoin interfaceIType
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
_shouldReload
public boolean _shouldReload()
- Specified by:
_shouldReloadin classITypeRef
-
_getType
protected final IType _getType()
-
checkNotDeleted
private void checkNotDeleted()
-
_getClassOfRef
public java.lang.Class<? extends IType> _getClassOfRef()
- Specified by:
_getClassOfRefin classITypeRef
-
_reload
protected final void _reload()
-
_resolveType
private void _resolveType()
-
_getTypeName
public java.lang.String _getTypeName()
-
_getTypeNameLong
public java.lang.String _getTypeNameLong()
-
_getIndexForSortingFast
public int _getIndexForSortingFast(java.lang.String key)
-
isDiscarded
public boolean isDiscarded()
Description copied from interface:ITypeTrue if this type has been replaced with a newer version of the same name in the type system.- Specified by:
isDiscardedin interfaceIType
-
setDiscarded
public void setDiscarded(boolean bDiscarded)
- Specified by:
setDiscardedin interfaceIType
-
_getTypeNameInternal
public java.lang.String _getTypeNameInternal()
This method is called reflectively.
-
isTypeRefreshedOutsideOfLock
public boolean isTypeRefreshedOutsideOfLock(IType type)
- Specified by:
isTypeRefreshedOutsideOfLockin classITypeRef
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-