constructFromClass
static Permission constructFromClass(Class<? extends Permission> permissionClass,
String targetName,
String permissionActions)
throws IllegalAccessException,
InvocationTargetException,
InstantiationException,
NoSuchMethodException
Utility method to reflectively construct a permission from a given class.
- Parameters:
permissionClass - the permission class
targetName - the optional target name
permissionActions - the optional actions name
- Returns:
- the permission
- Throws:
IllegalAccessException - if the necessary constructor is not accessible
InvocationTargetException - if the constructor failed
InstantiationException - if the object could not be instantiated for some reason
NoSuchMethodException - if none of the candidate constructors exist on the class