Package org.jboss.modules.security
Interface PermissionFactory
-
- All Known Implementing Classes:
ImmediatePermissionFactory,LoadedPermissionFactory,ModularPermissionFactory
public interface PermissionFactoryA factory forPermissionobjects.- Author:
- David M. Lloyd
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description Permissionconstruct()Construct a new instance of the permission.static PermissionconstructFromClass(Class<? extends Permission> permissionClass, String targetName, String permissionActions)Utility method to reflectively construct a permission from a given class.
-
-
-
Method Detail
-
construct
Permission construct()
Construct a new instance of the permission. The instance may be cached.- Returns:
- the permission
-
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 classtargetName- the optional target namepermissionActions- the optional actions name- Returns:
- the permission
- Throws:
IllegalAccessException- if the necessary constructor is not accessibleInvocationTargetException- if the constructor failedInstantiationException- if the object could not be instantiated for some reasonNoSuchMethodException- if none of the candidate constructors exist on the class
-
-