Package gw.internal.gosu.dynamic
Class DynamicTypeLoader
java.lang.Object
gw.config.BaseService
gw.lang.reflect.TypeLoaderBase
gw.internal.gosu.dynamic.DynamicTypeLoader
- All Implemented Interfaces:
IService,ITypeLoader,IPluginHost
-
Field Summary
FieldsFields inherited from class gw.lang.reflect.TypeLoaderBase
_module, _typeNamesFields inherited from interface gw.lang.reflect.ITypeLoader
NO_TYPES -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDon't call this method unless you really know what you're doing.Gets a type based on a fully-qualified name.booleanbooleanhasNamespace(String namespace) booleanvoidrefreshedNamespace(String namespace, IDirectory dir, RefreshKind kind) Methods inherited from class gw.lang.reflect.TypeLoaderBase
clearTypeNames, deleteIndexFile, getAllTypeNames, getModule, getNamespaceForDirectory, getResource, getTypeNames, getTypeNames, getTypesForFile, handlesDirectory, handlesFile, loadTypeNames, refreshed, refreshedFile, refreshedImpl, refreshedTypes, refreshedTypesImpl, saveTypeNames, shouldCacheTypeNames, showTypeNamesInIDE, shutdown, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface gw.plugin.IPluginHost
getInterface
-
Field Details
-
TYPE_NAMES
-
-
Constructor Details
-
DynamicTypeLoader
-
-
Method Details
-
isCaseSensitive
public boolean isCaseSensitive()- Specified by:
isCaseSensitivein interfaceITypeLoader- Overrides:
isCaseSensitivein classTypeLoaderBase
-
getType
Description copied from interface:ITypeLoaderGets a type based on a fully-qualified name. This could either be the name of an entity, like "entity.User", the name of a typekey, like "typekey.SystemPermission", or a class name, like "java.lang.String". Names can have [] appended to them to create arrays, and multi-dimensional arrays are supported.
If the type can be successfully resolved by the typeloader, it will be returned, otherwise it will return null. The sole exception to this rule is the top-level TypeLoaderAccess, which will throw aClassNotFoundExceptionif none of its composite typeloaders can load the type.
There is a global lock in TypeLoaderAccess that is acquired when this method is called. Basically one type at a time can be loaded from the system. This method is free to release that lock during this call. This is needed to deal with reentrant type loaders. It is the responsibility of this method to make sure the lock is reacquired before this method returns. Type loader access will guarentee that no duplicate types are put into the type loader.- Parameters:
fullyQualifiedName- the fully qualified name of the type- Returns:
- the corresponding IType or null
-
getAllNamespaces
Description copied from interface:ITypeLoaderDon't call this method unless you really know what you're doing.- Returns:
- the set of package (aka namespace) names in which this loader's types reside.
-
getHandledPrefixes
-
handlesNonPrefixLoads
public boolean handlesNonPrefixLoads() -
refreshedNamespace
-
hasNamespace
-
computeTypeNames
-