|
spring-expression | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.expression.spel.support.StandardTypeLocator
public class StandardTypeLocator
A default implementation of a TypeLocator that uses the context classloader (or any classloader set upon it). It supports 'well known' packages so if a type cannot be found it will try the registered imports to locate it.
Constructor Summary | |
---|---|
StandardTypeLocator()
|
|
StandardTypeLocator(java.lang.ClassLoader loader)
|
Method Summary | |
---|---|
java.lang.Class<?> |
findType(java.lang.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. |
java.util.List<java.lang.String> |
getImportPrefixes()
Return a list of all the import prefixes registered with this StandardTypeLocator. |
void |
registerImport(java.lang.String prefix)
Register a new import prefix that will be used when searching for unqualified types. |
void |
removeImport(java.lang.String prefix)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StandardTypeLocator()
public StandardTypeLocator(java.lang.ClassLoader loader)
Method Detail |
---|
public java.lang.Class<?> findType(java.lang.String typename) throws EvaluationException
findType
in interface TypeLocator
typename
- the type to locate
EvaluationException
- if the type cannot be foundpublic void registerImport(java.lang.String prefix)
prefix
- the prefix to registerpublic java.util.List<java.lang.String> getImportPrefixes()
public void removeImport(java.lang.String prefix)
|
spring-expression | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |