|
Evaluating Software Design Patterns — the "Gang of Four" patterns implemented in Java 6 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<ProxiedPolicy> dk.rode.thesis.proxy.ProxiedPolicy
public enum ProxiedPolicy
Additional policies for formatting proxied sequences
into char sequences (not part of the core Proxy implementation).
The policies handle both specific proxy classes based on a
decorated
sub-class, or anonymous
sequence proxies created via a SequenceProxyFactory
.
Implementation notes:
This is NOT part of the core Proxy functionality, merely
to provide better log descriptions!
See implementation notes for the ObjectPolicy
enumeration.
SequencePolicy
,
DecoratedPolicy
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface dk.rode.thesis.strategy.StringablePolicy |
---|
StringablePolicy.NameIdiom, StringablePolicy.Type |
Enum Constant Summary | |
---|---|
HIDDEN
Policy used to format string representations of proxies that hides the nested structure "from the sequence on". |
|
VISIBLE
Policy used to format string representations of proxies that indicates the nested structure. |
Method Summary | |
---|---|
StringablePolicy.Type |
type()
Returns the type of this policy. |
static ProxiedPolicy |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static ProxiedPolicy[] |
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 |
Methods inherited from interface dk.rode.thesis.strategy.StringablePolicy |
---|
toString |
Enum Constant Detail |
---|
public static final ProxiedPolicy HIDDEN
public static final ProxiedPolicy VISIBLE
Both specific proxy classed created based on a decorated
sequence and proxies based on the java.lang.reflect.Proxy
class are respected.
Notice that a given sequence will be listed with all proxies registered to it even if the sequence is accessed outside the scope of the proxy for the current context.
Proxies using HIDDEN
as their default
policy are respected.
Method Detail |
---|
public StringablePolicy.Type type()
StringablePolicy
type
of this policy.
The stringable
context can use the
type to decide how to use the textual representation of
this policy in conjunction with additional text.
type
in interface StringablePolicy<Sequence<?>>
StringablePolicy.Type.APPENDABLE
.public static ProxiedPolicy valueOf(String name)
name
- the name of the enum constant to be returned.
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is nullpublic static ProxiedPolicy[] values()
for (ProxiedPolicy c : ProxiedPolicy.values()) System.out.println(c);
|
Gunni Rode / rode.dk | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |