Package org.jboss.modules.security
Interface PermissionFactory
-
- All Known Implementing Classes:
ImmediatePermissionFactory
,LoadedPermissionFactory
,ModularPermissionFactory
public interface PermissionFactory
A factory forPermission
objects.- Author:
- David M. Lloyd
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description java.security.Permission
construct()
Construct a new instance of the permission.static java.security.Permission
constructFromClass(java.lang.Class<? extends java.security.Permission> permissionClass, java.lang.String targetName, java.lang.String permissionActions)
Utility method to reflectively construct a permission from a given class.
-
-
-
Method Detail
-
construct
java.security.Permission construct()
Construct a new instance of the permission. The instance may be cached.- Returns:
- the permission
-
constructFromClass
static java.security.Permission constructFromClass(java.lang.Class<? extends java.security.Permission> permissionClass, java.lang.String targetName, java.lang.String permissionActions) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, java.lang.InstantiationException, java.lang.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:
java.lang.IllegalAccessException
- if the necessary constructor is not accessiblejava.lang.reflect.InvocationTargetException
- if the constructor failedjava.lang.InstantiationException
- if the object could not be instantiated for some reasonjava.lang.NoSuchMethodException
- if none of the candidate constructors exist on the class
-
-