public interface ITypeLoader extends IService
| Modifier and Type | Method and Description |
|---|---|
Set<String> |
computeTypeNames() |
Set<? extends CharSequence> |
getAllNamespaces()
Don't call this method unless you really know what you're doing.
|
Set<? extends CharSequence> |
getAllTypeNames() |
List<String> |
getHandledPrefixes() |
IModule |
getModule() |
String |
getNamespaceForDirectory(IDirectory dir) |
URL |
getResource(String name)
Finds the resource with the given name.
|
IType |
getType(String fullyQualifiedName)
Gets a type based on a fully-qualified name.
|
Set<TypeName> |
getTypeNames(String namespace) |
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) |
boolean |
handlesNonPrefixLoads() |
boolean |
hasNamespace(String namespace) |
boolean |
isCaseSensitive() |
void |
refreshed()
Fired when the typesystem is fully refreshed
|
RefreshKind |
refreshedFile(IFile file,
String[] types,
RefreshKind kind)
Notifies the type loader that a file has been refreshed.
|
void |
refreshedNamespace(String namespace,
IDirectory dir,
RefreshKind kind) |
void |
refreshedTypes(RefreshRequest request)
Fired when an existing type is refreshed, i.e.
|
boolean |
showTypeNamesInIDE() |
void |
shutdown() |
getInterfacestatic final String[] NO_TYPES
IModule getModule()
IType getType(String fullyQualifiedName)
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 a
ClassNotFoundException if 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.
fullyQualifiedName - the fully qualified name of the typeSet<? extends CharSequence> getAllTypeNames()
boolean showTypeNamesInIDE()
Set<? extends CharSequence> getAllNamespaces()
URL getResource(String name)
The name of a resource is a '/'-separated path name that identifies the resource.
name - The resource nameboolean isCaseSensitive()
boolean handlesNonPrefixLoads()
boolean handlesFile(IFile file)
String[] getTypesForFile(IFile file)
file - The file in questionRefreshKind refreshedFile(IFile file, String[] types, RefreshKind kind)
file - The file that was refreshedtypes - kind - @return All known types affected by the file changevoid refreshedNamespace(String namespace, IDirectory dir, RefreshKind kind)
void refreshedTypes(RefreshRequest request)
request - void refreshed()
boolean handlesDirectory(IDirectory dir)
String getNamespaceForDirectory(IDirectory dir)
boolean hasNamespace(String namespace)
void shutdown()
Copyright © 2021. All rights reserved.