public static boolean isInstaneOf(Class src,Class trg){
  if (src.isArray() && trg.isArray()) {
    return isInstaneOf(src.getComponentType(),trg.getComponentType());
  }
  if (src == trg)   return true;
  if (trg.isInterface()) {
    return _checkInterfaces(src,trg);
  }
  while (src != null) {
    if (src == trg)     return true;
    src=src.getSuperclass();
  }
  return trg == Object.class;
}

public static boolean isInstaneOf ( Class src , Class trg ) { if ( src . isArray ( ) && trg . isArray ( ) ) { return isInstaneOf ( src . getComponentType ( ) , trg . getComponentType ( ) ) ; } if ( src == trg ) return true ; if ( trg . isInterface ( ) ) { return _checkInterfaces ( src , trg ) ; } while ( src != null ) { if ( src == trg ) return true ; src = src . getSuperclass ( ) ; } return trg == Object . class ; }
check if class is instanceof a a other class
