Package gw.lang.reflect
Class TypeLoaderBase
java.lang.Object
gw.config.BaseService
gw.lang.reflect.TypeLoaderBase
- All Implemented Interfaces:
IService,ITypeLoader,IPluginHost
- Direct Known Subclasses:
DynamicTypeLoader,PackageTypeLoader,PropertiesTypeLoader,SimpleTypeLoader,TypeInPackageTypeLoader
-
Field Summary
FieldsFields inherited from interface gw.lang.reflect.ITypeLoader
NO_TYPES -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDeprecated.use TypeLoaderBase( IModule )protectedTypeLoaderBase(IModule module) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidprivate StringgetId()getResource(String name) Finds the resource with the given name.getTypeNames(String namespace) getTypeNames(String parentNamespace, ITypeLoader loader) String[]getTypesForFile(IFile file) Returns ALL type names associated with the given file whether or not the types have been loaded yet.booleanbooleanhandlesFile(IFile file) booleanfinal voidFired when the typesystem is fully refreshedrefreshedFile(IFile file, String[] types, RefreshKind kind) Notifies the type loader that a file has been refreshed.protected voidfinal voidrefreshedTypes(RefreshRequest request) Fired when an existing type is refreshed, i.e.protected voidrefreshedTypesImpl(RefreshRequest request) voidprotected booleanbooleanvoidshutdown()toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface gw.plugin.IPluginHost
getInterfaceMethods inherited from interface gw.lang.reflect.ITypeLoader
computeTypeNames, getAllNamespaces, getHandledPrefixes, getType, handlesNonPrefixLoads, hasNamespace, refreshedNamespace
-
Field Details
-
_module
-
_typeNames
-
-
Constructor Details
-
TypeLoaderBase
protected TypeLoaderBase()Deprecated.use TypeLoaderBase( IModule ) -
TypeLoaderBase
-
-
Method Details
-
getModule
- Specified by:
getModulein interfaceITypeLoader- Returns:
- The module to which this type loader belongs.
-
isCaseSensitive
public boolean isCaseSensitive()- Specified by:
isCaseSensitivein interfaceITypeLoader
-
handlesFile
- Specified by:
handlesFilein interfaceITypeLoader
-
handlesDirectory
- Specified by:
handlesDirectoryin interfaceITypeLoader
-
getNamespaceForDirectory
- Specified by:
getNamespaceForDirectoryin interfaceITypeLoader
-
getTypesForFile
Description copied from interface:ITypeLoaderReturns ALL type names associated with the given file whether or not the types have been loaded yet. Type loading should NOT be used in the implementation of this method.- Specified by:
getTypesForFilein interfaceITypeLoader- Parameters:
file- The file in question- Returns:
- All known types derived from that file
-
refreshedFile
Description copied from interface:ITypeLoaderNotifies the type loader that a file has been refreshed. The type loader should return all types that it knows need to be refreshed based on the given file.- Specified by:
refreshedFilein interfaceITypeLoader- Parameters:
file- The file that was refreshed- Returns:
- All known types affected by the file change
-
getResource
Description copied from interface:ITypeLoaderFinds the resource with the given name. A resource is some data that can be accessed by class code in a way that may be independent of the location of the code. The exact location of the resource is dependent upon the loader implementationThe name of a resource is a '/'-separated path name that identifies the resource.
- Specified by:
getResourcein interfaceITypeLoader- Parameters:
name- The resource name- Returns:
- A URL object for reading the resource, or null if the resource could not be found or the invoker doesn't have adequate privileges to get the resource.
-
refreshedTypes
Description copied from interface:ITypeLoaderFired when an existing type is refreshed, i.e. there are potential changes- Specified by:
refreshedTypesin interfaceITypeLoader
-
refreshedTypesImpl
-
refreshed
public final void refreshed()Description copied from interface:ITypeLoaderFired when the typesystem is fully refreshed- Specified by:
refreshedin interfaceITypeLoader
-
clearTypeNames
protected void clearTypeNames() -
refreshedImpl
protected void refreshedImpl() -
toString
-
getTypeNames
- Specified by:
getTypeNamesin interfaceITypeLoader
-
getTypeNames
-
showTypeNamesInIDE
public boolean showTypeNamesInIDE()- Specified by:
showTypeNamesInIDEin interfaceITypeLoader
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceITypeLoader
-
getId
-
deleteIndexFile
protected void deleteIndexFile() -
saveTypeNames
public void saveTypeNames() -
loadTypeNames
-
getAllTypeNames
- Specified by:
getAllTypeNamesin interfaceITypeLoader- Returns:
- the set of fully qualified type names this loader is responsible for loading. Note due to the dynamic nature of some type loaders, there is no guarantee that all types for a given loader are known at the time this method is called.
-
shouldCacheTypeNames
protected boolean shouldCacheTypeNames()
-