Package gw.internal.gosu.properties
Class PropertiesTypeLoader
java.lang.Object
gw.config.BaseService
gw.lang.reflect.TypeLoaderBase
gw.internal.gosu.properties.PropertiesTypeLoader
- All Implemented Interfaces:
IService
,ITypeLoader
,IPluginHost
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class
Set of case insensitive type names with operation to quickly find which type names in the set are possible matches for a full type name. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final LockingLazyVar<Map<PropertySetSource,
PropertiesTypeLoader.TypeNameSet>> private List<PropertySetSource>
private static final String
private static final String
Fields inherited from class gw.lang.reflect.TypeLoaderBase
_module, _typeNames
Fields inherited from interface gw.lang.reflect.ITypeLoader
NO_TYPES
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreatePropertyTypesForPropertySetWithName
(PropertySetSource source, String name) private IType
createPropertyTypesFromPropertyNodeTree
(HashMap<String, IType> resultMap, PropertyNode node, IFile file) Don't call this method unless you really know what you're doing.<T> T
getInterface
(Class<T> apiInterface) Provides an implementation of a specified interface.Gets a type based on a fully-qualified name.String[]
getTypesForFile
(IFile file) Returns ALL type names associated with the given file whether or not the types have been loaded yet.boolean
handlesFile
(IFile file) boolean
boolean
hasNamespace
(String namespace) private void
initSources
(IModule module) static boolean
isDisplayPropertiesFile
(String fileName) refreshedFile
(IFile file, String[] types, RefreshKind kind) Notifies the type loader that a file has been refreshed.void
void
refreshedNamespace
(String namespace, IDirectory dir, RefreshKind kind) Methods inherited from class gw.lang.reflect.TypeLoaderBase
clearTypeNames, deleteIndexFile, getAllTypeNames, getModule, getNamespaceForDirectory, getResource, getTypeNames, getTypeNames, handlesDirectory, isCaseSensitive, loadTypeNames, refreshed, refreshedTypes, refreshedTypesImpl, saveTypeNames, shouldCacheTypeNames, showTypeNamesInIDE, shutdown, toString
-
Field Details
-
FILE_EXTENSION
- See Also:
-
DISPLAY_PROPERTIES
- See Also:
-
_namespaces
-
_sources
-
_rootTypeNames
private final LockingLazyVar<Map<PropertySetSource,PropertiesTypeLoader.TypeNameSet>> _rootTypeNames
-
-
Constructor Details
-
PropertiesTypeLoader
-
-
Method Details
-
initSources
-
computeTypeNames
-
getHandledPrefixes
-
handlesNonPrefixLoads
public boolean handlesNonPrefixLoads() -
handlesFile
- Specified by:
handlesFile
in interfaceITypeLoader
- Overrides:
handlesFile
in classTypeLoaderBase
-
isDisplayPropertiesFile
-
getType
Description copied from interface:ITypeLoader
Gets 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.ClassNotFoundException
if none of its composite typeloaders can load the type.- Parameters:
fullyQualifiedName
- the fully qualified name of the type- Returns:
- the corresponding IType or null
-
refreshedImpl
public void refreshedImpl()- Overrides:
refreshedImpl
in classTypeLoaderBase
-
createPropertyTypesForPropertySetWithName
private Map<String,IType> createPropertyTypesForPropertySetWithName(PropertySetSource source, String name) -
createPropertyTypesFromPropertyNodeTree
-
getTypesForFile
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
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
-
hasNamespace
-
getAllNamespaces
Description copied from interface:ITypeLoader
Don'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.
-
refreshedNamespace
-
getInterface
Description copied from interface:IPluginHost
Provides an implementation of a specified interface.- Returns:
- The implementation of the interface or null if unsupported.
-