base/common/src/main/com/thesett/common/util/ReflectionUtils.java
public static boolean isSubTypeOf(Class parentClass, Class childClass)
    {
        try
        {
            // Check that the child class can be cast as a sub-type of the parent.
            childClass.asSubclass(parentClass);

            return true;
        }
        catch (ClassCastException e)
        {
            // Exception noted so can be ignored.
            e = null;

            return false;
        }
    }
public static boolean isSubTypeOf(Class parentClass, Class childClass)
    {
        try
        {
            // Check that the child class can be cast as a sub-type of the parent.
            childClass.asSubclass(parentClass);

            return true;
        }
        catch (ClassCastException e)
        {
            // Exception noted so can be ignored.
            e = null;

            return false;
        }
    }
Checks that the child class is the same type or a sub-type of the parent class.

@param  parentClass The parent class.
@param  childClass  The child class.

@return <tt>true</tt> if the child class is the same type or a sub-type of the parent class, <tt>false</tt>
otherwise.