All Packages Class Hierarchy This Package Previous Next Index
Class openstar.util.ClassTest
java.lang.Object
|
+----openstar.util.ClassTest
- public class ClassTest
- extends Object
Utility class to test objects for beeing of a specific type.
- Version:
- 09 Apr 1997
- Author:
- Nils Schwabe
-
ClassTest(Class, boolean)
- Constructs a new ClassTest object that is used to test
objects against a given type signature.
-
getClassName()
- Returns the name of the test class.
-
isPolymorphic()
- Returns the polymorphic indicator.
-
isValid(Object)
- Tests and object against the predefined type.
ClassTest
public ClassTest(Class testClass,
boolean polymorphic)
- Constructs a new ClassTest object that is used to test
objects against a given type signature.
- Parameters:
- testClass - The class object which objects should be tested against.
- polymorphic -
false
- an object must be of the exact type to pass the test
true
- objects may be members of subclass(es) of testClass to pass the test.
isValid
public boolean isValid(Object object)
- Tests and object against the predefined type.
- Returns:
-
true
- if the object passed the type test.
getClassName
public String getClassName()
- Returns the name of the test class.
isPolymorphic
public boolean isPolymorphic()
- Returns the polymorphic indicator.
All Packages Class Hierarchy This Package Previous Next Index