Re: 'is subclass' check out.
Posted By:
Simon_Ablett
Posted On:
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.
or,
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
or,
alternate solution 2: use 'myClass.class.isInstance(yourClass)' which behaves in a similiar way to 'instanceOf'
Regards.