public static Class < ? > safeClassForName ( ClassLoader classLoader , String className ) { try { if ( className . startsWith ( "com.sun." ) || className . startsWith ( "com.apple." ) ) { return null ; } else { return Class . forName ( className , true , classLoader ) ; } } catch ( ClassNotFoundException e ) { return null ; } catch ( NoClassDefFoundError e ) { return null ; } }
Get the class for the given className via the given classLoader