public static boolean isVisible(Class<?> clazz,ClassLoader classLoader){
  if (classLoader == null) {
    return true;
  }
  try {
    Class<?> actualClass=classLoader.loadClass(clazz.getName());
    return (clazz == actualClass);
  }
 catch (  ClassNotFoundException ex) {
    return false;
  }
}

public static boolean isVisible ( Class < ? > clazz , ClassLoader classLoader ) { if ( classLoader == null ) { return true ; } try { Class < ? > actualClass = classLoader . loadClass ( clazz . getName ( ) ) ; return ( clazz == actualClass ) ; } catch ( ClassNotFoundException ex ) { return false ; } }
check whether the given class is visible in the given classloader .
