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

Constructor Index

 o ClassTest(Class, boolean)
Constructs a new ClassTest object that is used to test objects against a given type signature.

Method Index

 o getClassName()
Returns the name of the test class.
 o isPolymorphic()
Returns the polymorphic indicator.
 o isValid(Object)
Tests and object against the predefined type.

Constructors

 o 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.

Methods

 o isValid
  public boolean isValid(Object object)
Tests and object against the predefined type.

Returns:
true - if the object passed the type test.
 o getClassName
  public String getClassName()
Returns the name of the test class.

 o isPolymorphic
  public boolean isPolymorphic()
Returns the polymorphic indicator.


All Packages  Class Hierarchy  This Package  Previous  Next  Index