public boolean checkInstanceOf(Context context, CharSequence targetClassName,
            CharSequence loaderPackage, Class<?> referenceClass) {
        if ((targetClassName == null) || (referenceClass == null)) {
            return false;
        }

        final Class<?> targetClass = loadOrGetCachedClass(context, targetClassName, loaderPackage);
        if (targetClass == null) {
            return false;
        }

        return referenceClass.isAssignableFrom(targetClass);
    }
public boolean checkInstanceOf ( Context context , CharSequence targetClassName , CharSequence loaderPackage , Class < ? > referenceClass ) { if ( ( targetClassName == null ) || ( referenceClass == null ) ) { return false ; } final Class < ? > targetClass = loadOrGetCachedClass ( context , targetClassName , loaderPackage ) ; if ( targetClass == null ) { return false ; } return referenceClass . isAssignableFrom ( targetClass ) ; }
Returns whether a target class is an instance of a reference class.
<p>
If a class cannot be loaded by the default {@link ClassLoader}, this
method will attempt to use the loader for the specified app package.
</p>