|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.application.CompoundClassResolver
public class CompoundClassResolver
A thread safe compound IClassResolver
. Class resolving is done by iterating through all
IClassResolver
s until the class is found. Resource resolving is done by combining the
results of all IClassResolver
s.
Constructor Summary | |
---|---|
CompoundClassResolver()
|
Method Summary | |
---|---|
CompoundClassResolver |
add(IClassResolver resolver)
Adds a resolver |
java.util.Iterator<java.net.URL> |
getResources(java.lang.String name)
Tries to load all the resources by the name that is given. |
CompoundClassResolver |
remove(IClassResolver resolver)
Removes a resolver |
java.lang.Class<?> |
resolveClass(java.lang.String className)
Resolves a class by name (which may or may not involve loading it; thus the name class *resolver* not *loader*). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CompoundClassResolver()
Method Detail |
---|
public java.lang.Class<?> resolveClass(java.lang.String className) throws java.lang.ClassNotFoundException
This implementation iterates through all the IClassResolver
trying to load the class
until the class is found.
resolveClass
in interface IClassResolver
className
- The name of the class to resolve.
Class
, if it is found.
java.lang.ClassNotFoundException
- If the class was not foundpublic java.util.Iterator<java.net.URL> getResources(java.lang.String name)
This implementation iterates through all IClassResolver
s added, and combines the
results into one Set
of URL
s, and returns an Iterator
for the set.
URL
s are unique in the set.
getResources
in interface IClassResolver
name
- The name of the resource to find.
Iterator
of all the URL
s matching the resource name.public CompoundClassResolver add(IClassResolver resolver)
resolver
- The resolver to add
this
for chainingpublic CompoundClassResolver remove(IClassResolver resolver)
resolver
- The resolver to remove
this
for chaining
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |