(String className)
| 16 | /** Collection of utilities */ |
| 17 | public class Kit { |
| 18 | public static Class<?> classOrNull(String className) { |
| 19 | try { |
| 20 | return Class.forName(className); |
| 21 | } catch (ClassNotFoundException | LinkageError | SecurityException ex) { |
| 22 | } catch (IllegalArgumentException e) { |
| 23 | // Can be thrown if name has characters that a class name |
| 24 | // can not contain |
| 25 | } |
| 26 | return null; |
| 27 | } |
| 28 | |
| 29 | /** Attempt to load the class of the given name. Note that the type parameter isn't checked. */ |
| 30 | public static Class<?> classOrNull(ClassLoader loader, String className) { |
no test coverage detected