public enum Policy extends Enum<Policy>
PrivilegedAction
s.Enum Constant and Description |
---|
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. |
Modifier and Type | Method and Description |
---|---|
static Policy |
defaultValue()
Get the
Policy value that should be used as a default. |
boolean |
isConditional()
Learn whether this is a conditional
Policy . |
static Policy |
parse(String str)
Parse from a
String returning defaultValue() for blank/null input. |
static Policy |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Policy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Policy ON_INIT
SecurityManager
is done once only.public static final Policy DYNAMIC
SecurityManager
is done for each Privileged
method
execution.public static final Policy ALWAYS
Privileged
methods are always executed as such.public static Policy[] values()
for (Policy c : Policy.values()) System.out.println(c);
public static Policy valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullpublic static Policy defaultValue()
Policy
value that should be used as a default.DYNAMIC
public static Policy parse(String str)
String
returning defaultValue()
for blank/null input.str
- to parsePolicy
public boolean isConditional()
Policy
.this == ON_INIT || this == DYNAMIC
Copyright © 2014 The Apache Software Foundation. All rights reserved.