Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static Module getModuleFromClass(Class<?> c)
- throws InstantiationException, ModuleLoadException,
- IllegalAccessException
- {
- if (!Module.class.isAssignableFrom(c))
- {
- throw new ModuleLoadException(
- "Passed in Class does not represent a Module.");
- }
- else
- {
- return (Module) c.newInstance();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement