Package gw.lang.reflect
Class SimpleTypeLoader
- java.lang.Object
-
- gw.config.BaseService
-
- gw.lang.reflect.TypeLoaderBase
-
- gw.lang.reflect.SimpleTypeLoader
-
- All Implemented Interfaces:
IService
,ITypeLoader
,IPluginHost
- Direct Known Subclasses:
DefaultTypeLoader
,GosuClassTypeLoader
public abstract class SimpleTypeLoader extends TypeLoaderBase
-
-
Field Summary
-
Fields inherited from class gw.lang.reflect.TypeLoaderBase
_module, _typeNames
-
Fields inherited from interface gw.lang.reflect.ITypeLoader
NO_TYPES
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SimpleTypeLoader(IModule module)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Set<String>
getExtensions()
String
getNamespaceForDirectory(IDirectory dir)
String[]
getTypesForFile(IFile file)
Returns ALL type names associated with the given file whether or not the types have been loaded yet.boolean
handlesDirectory(IDirectory dir)
boolean
handlesFile(IFile file)
RefreshKind
refreshedFile(IFile file, String[] types, RefreshKind kind)
Notifies the type loader that a file has been refreshed.-
Methods inherited from class gw.lang.reflect.TypeLoaderBase
clearTypeNames, deleteIndexFile, getAllTypeNames, getModule, getResource, getTypeNames, getTypeNames, isCaseSensitive, loadTypeNames, refreshed, refreshedImpl, refreshedTypes, refreshedTypesImpl, saveTypeNames, shouldCacheTypeNames, showTypeNamesInIDE, shutdown, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface gw.plugin.IPluginHost
getInterface
-
Methods inherited from interface gw.lang.reflect.ITypeLoader
computeTypeNames, getAllNamespaces, getHandledPrefixes, getType, handlesNonPrefixLoads, hasNamespace, refreshedNamespace
-
-
-
-
Constructor Detail
-
SimpleTypeLoader
protected SimpleTypeLoader(IModule module)
-
-
Method Detail
-
handlesFile
public boolean handlesFile(IFile file)
- Specified by:
handlesFile
in interfaceITypeLoader
- Overrides:
handlesFile
in classTypeLoaderBase
-
getTypesForFile
public String[] getTypesForFile(IFile file)
Description copied from interface:ITypeLoader
Returns 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:
getTypesForFile
in interfaceITypeLoader
- Overrides:
getTypesForFile
in classTypeLoaderBase
- Parameters:
file
- The file in question- Returns:
- All known types derived from that file
-
refreshedFile
public RefreshKind refreshedFile(IFile file, String[] types, RefreshKind kind)
Description copied from interface:ITypeLoader
Notifies 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:
refreshedFile
in interfaceITypeLoader
- Overrides:
refreshedFile
in classTypeLoaderBase
- Parameters:
file
- The file that was refreshed- Returns:
- All known types affected by the file change
-
handlesDirectory
public boolean handlesDirectory(IDirectory dir)
- Specified by:
handlesDirectory
in interfaceITypeLoader
- Overrides:
handlesDirectory
in classTypeLoaderBase
-
getNamespaceForDirectory
public String getNamespaceForDirectory(IDirectory dir)
- Specified by:
getNamespaceForDirectory
in interfaceITypeLoader
- Overrides:
getNamespaceForDirectory
in classTypeLoaderBase
-
-