Re: 'is subclass' check out.
Wednesday, May 22, 2002 05:17 AM
Try 'myClass.class.getSuperClass()'. This will retrieve a handle to to the superclass that your class (i.e. 'myClass' in the example) extends.
alternate solution 1: use 'myClass instanceof yourClass' which will check whether or not 'myClass' is an instance of the type of class represented by 'yourClass'. Where 'yourClass' could be one of 'myClass' supertypes
alternate solution 2: use 'myClass.class.isInstance(yourClass)' which behaves in a similiar way to 'instanceOf'