|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.zkoss.lang.ImportedClassResolver
public class ImportedClassResolver
The class resolve that allows to import classes and packages, like Java's import statement does.
For example,
ImportedClassResolver resolver = new ImportedClassResolver();
resolver.addImportedClass("org.zkoss.lang.*");
resolver.addImportedClass("org.zkoss.util.Maps");
resolver.resolveClass("ImportedClassResolver");
SimpleClassResolver
,
Serialized FormConstructor Summary | |
---|---|
ImportedClassResolver()
|
Method Summary | |
---|---|
void |
addAll(ImportedClassResolver resolver)
Adds all imported classes of the given class resolver. |
void |
addImportedClass(java.lang.String clsptn)
Adds an imported class Like Java, it is used to import a class or a package of classes, so that it simplifies the use of the apply attribute, the init directive and others. |
java.util.List<java.lang.String> |
getImportedClasses()
Returns a readonly list of the imported class. |
java.lang.Class<?> |
resolveClass(java.lang.String clsnm)
Resolves the class of the specified name. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImportedClassResolver()
Method Detail |
---|
public void addImportedClass(java.lang.String clsptn) throws java.lang.ClassNotFoundException
clsptn
- the class's fully-qualified name, e.g., com.foo.FooComposer
,
a wildcard representing all classes of the give package, e.g., com.foo.*
.
java.lang.ClassNotFoundException
public java.util.List<java.lang.String> getImportedClasses()
public void addAll(ImportedClassResolver resolver)
public java.lang.Class<?> resolveClass(java.lang.String clsnm) throws java.lang.ClassNotFoundException
ClassResolver
resolveClass
in interface ClassResolver
java.lang.ClassNotFoundException
- if the class is not found.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |