public enum ValueGetter extends Enum<ValueGetter>
This abstraction hides the handling of Holder.
ValueGetter is a stateless behavior encapsulation.
| Enum Constant and Description |
|---|
HOLDER
|
PLAIN
ValueGetter that works for WebParam.Mode.IN parameter. |
| Modifier and Type | Method and Description |
|---|---|
abstract Object |
get(Object parameter)
Gets the value to be sent, from a parameter given as a method argument.
|
static ValueGetter |
get(ParameterImpl p)
Returns a
ValueGetter suitable for the given Parameter. |
static ValueGetter |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ValueGetter[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ValueGetter PLAIN
ValueGetter that works for WebParam.Mode.IN parameter.
Since it's the IN mode, the parameter is not a Holder,
therefore the parameter itself is a value.
public static final ValueGetter HOLDER
ValueGetter that works for Holder,
which is WebParam.Mode.INOUT or WebParam.Mode.OUT.
In those WebParam.Modes, the parameter is a Holder,
so the value to be sent is obtained by getting the value of the holder.
public static ValueGetter[] values()
for (ValueGetter c : ValueGetter.values()) System.out.println(c);
public static ValueGetter 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 abstract Object get(Object parameter)
public static ValueGetter get(ParameterImpl p)
ValueGetter suitable for the given Parameter.Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.