public class StandardTypeLocator extends Object implements TypeLocator
| Constructor and Description |
|---|
StandardTypeLocator() |
StandardTypeLocator(ClassLoader loader) |
| Modifier and Type | Method and Description |
|---|---|
Class<?> |
findType(String typename)
Find a (possibly unqualified) type reference - first using the typename as is, then trying any registered
prefixes if the typename cannot be found.
|
List<String> |
getImportPrefixes()
Return a list of all the import prefixes registered with this StandardTypeLocator.
|
void |
registerImport(String prefix)
Register a new import prefix that will be used when searching for unqualified types.
|
void |
removeImport(String prefix) |
public StandardTypeLocator()
public StandardTypeLocator(ClassLoader loader)
public Class<?> findType(String typename) throws EvaluationException
findType in interface TypeLocatortypename - the type to locateEvaluationException - if the type cannot be foundpublic void registerImport(String prefix)
prefix - the prefix to registerpublic List<String> getImportPrefixes()
public void removeImport(String prefix)