org.apache.commons.privilizer.weave
Enum Privilizer.Policy

java.lang.Object
  extended by java.lang.Enum<Privilizer.Policy>
      extended by org.apache.commons.privilizer.weave.Privilizer.Policy
All Implemented Interfaces:
Serializable, Comparable<Privilizer.Policy>
Enclosing class:
Privilizer<SELF extends Privilizer<SELF>>

public static enum Privilizer.Policy
extends Enum<Privilizer.Policy>

Weaving policy: when to use PrivilegedActions.


Enum Constant Summary
ALWAYS
          Weaves such that Privileged methods are always executed as such.
DYNAMIC
          Weaves such that the check for an active SecurityManager is done for each Privileged method execution.
NEVER
          Disables weaving.
ON_INIT
          Weaves such that the check for an active SecurityManager is done once only.
 
Method Summary
static Privilizer.Policy valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Privilizer.Policy[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NEVER

public static final Privilizer.Policy NEVER
Disables weaving.


ON_INIT

public static final Privilizer.Policy ON_INIT
Weaves such that the check for an active SecurityManager is done once only.


DYNAMIC

public static final Privilizer.Policy DYNAMIC
Weaves such that the check for an active SecurityManager is done for each Privileged method execution.


ALWAYS

public static final Privilizer.Policy ALWAYS
Weaves such that Privileged methods are always executed as such.

Method Detail

values

public static Privilizer.Policy[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Privilizer.Policy c : Privilizer.Policy.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Privilizer.Policy valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.