(String name)
| 3 | public class ReflectionUtil { |
| 4 | |
| 5 | public static Class<?> forName(String name) { |
| 6 | try { |
| 7 | return Class.forName(name); |
| 8 | } catch (ClassNotFoundException e) { |
| 9 | throw new RuntimeException("Class '" + name + "' not found!"); |
| 10 | } |
| 11 | } |
| 12 | |
| 13 | public static <T> T cast(Class<T> c, Object o) { |
| 14 | return c.cast(o); |
no outgoing calls
no test coverage detected