|
||||||||||
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 |
Iterator<URL> |
getResources(String name)
Tries to load all the resources by the name that is given. 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. |
CompoundClassResolver |
remove(IClassResolver resolver)
Removes a resolver |
Class<?> |
resolveClass(String className)
Resolves a class by name (which may or may not involve loading it; thus the name class *resolver* not *loader*). This implementation iterates through all the IClassResolver trying to load the class
until the class is found. |
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 Class<?> resolveClass(String className) throws 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.
ClassNotFoundException
- If the class was not foundpublic Iterator<URL> getResources(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 |