umontreal.iro.lecuyer.util
Class ClassFinderWithBase<T>
java.lang.Object
umontreal.iro.lecuyer.util.ClassFinder
umontreal.iro.lecuyer.util.ClassFinderWithBase<T>
- Type Parameters:
T
- the type of the base class.
- All Implemented Interfaces:
- Serializable, Cloneable
public class ClassFinderWithBase<T>
- extends ClassFinder
Extends the ClassFinder
class to find classes
extending a specified base class or implementing
a given base interface.
The overridden findClass(String)
method ensures that the class found
by ClassFinder
is assignable to the base class.
- See Also:
- Serialized Form
ClassFinderWithBase
public ClassFinderWithBase(Class<T> baseClass)
- Constructs a new class finder with base class
baseClass.
- Parameters:
baseClass
- the base class.
- Throws:
NullPointerException
- if baseClass is null.
getBaseClass
public Class<T> getBaseClass()
- Returns the base class for any class returned by
the
findClass(String)
method.
- Returns:
- the base class.
findClass
public Class<? extends T> findClass(String name)
throws ClassNotFoundException,
NameConflictException
- Overrides:
findClass
in class ClassFinder
- Throws:
ClassNotFoundException
NameConflictException
To submit a bug or ask questions, send an e-mail to
Richard Simard.