public enum ExecutionStrategy extends java.lang.Enum<ExecutionStrategy>
Enum Constant and Description |
---|
ALL_LITERALS
This is identical to AVAILABLE_LITERALS, except for the fact that it does not skip keys if its missing in the input, like literal does
Given this works like defaultr, a missing key is our point of entry to insert a default value, either from a passed context or a
hardcoded value.
|
ALL_LITERALS_WITH_COMPUTED |
AVAILABLE_LITERALS
The performance assumption built into this code is that the literal values in the spec, are generally smaller
than the number of potential keys to check in the input.
|
AVAILABLE_LITERALS_WITH_COMPUTED
We have both literal and computed children, but we have determined that there is no way an input key
could match one of our literal and computed children.
|
COMPUTED
If the CompositeSpec only has computed children, we can avoid checking the getLiteralChildren() altogether, and
we can do a slightly better iteration (HashSet.entrySet) across the input.
|
CONFLICT
In order to implement the key precedence order, we have to process each input "key", first to
see if it matches any literals, and if it does not, check against each of the computed
|
Modifier and Type | Method and Description |
---|---|
private static <T extends BaseSpec> |
applyKeyToComputed(java.util.List<T> computedChildren,
WalkedPath walkedPath,
java.util.Map<java.lang.String,java.lang.Object> output,
java.lang.String subKeyStr,
Optional<java.lang.Object> subInputOptional,
java.util.Map<java.lang.String,java.lang.Object> context) |
private static <T extends OrderedCompositeSpec> |
applyKeyToLiteralAndComputed(T spec,
java.lang.String subKeyStr,
Optional<java.lang.Object> subInputOptional,
WalkedPath walkedPath,
java.util.Map<java.lang.String,java.lang.Object> output,
java.util.Map<java.lang.String,java.lang.Object> context)
This is the method we are trying to avoid calling.
|
void |
process(OrderedCompositeSpec spec,
Optional<java.lang.Object> inputOptional,
WalkedPath walkedPath,
java.util.Map<java.lang.String,java.lang.Object> output,
java.util.Map<java.lang.String,java.lang.Object> context) |
(package private) abstract void |
processList(OrderedCompositeSpec spec,
java.util.List<java.lang.Object> inputList,
WalkedPath walkedPath,
java.util.Map<java.lang.String,java.lang.Object> output,
java.util.Map<java.lang.String,java.lang.Object> context) |
(package private) abstract void |
processMap(OrderedCompositeSpec spec,
java.util.Map<java.lang.String,java.lang.Object> inputMap,
WalkedPath walkedPath,
java.util.Map<java.lang.String,java.lang.Object> output,
java.util.Map<java.lang.String,java.lang.Object> context) |
(package private) abstract void |
processScalar(OrderedCompositeSpec spec,
java.lang.String scalarInput,
WalkedPath walkedPath,
java.util.Map<java.lang.String,java.lang.Object> output,
java.util.Map<java.lang.String,java.lang.Object> context) |
static ExecutionStrategy |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ExecutionStrategy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ExecutionStrategy AVAILABLE_LITERALS
public static final ExecutionStrategy ALL_LITERALS
public static final ExecutionStrategy COMPUTED
public static final ExecutionStrategy CONFLICT
public static final ExecutionStrategy AVAILABLE_LITERALS_WITH_COMPUTED
public static final ExecutionStrategy ALL_LITERALS_WITH_COMPUTED
public static ExecutionStrategy[] values()
for (ExecutionStrategy c : ExecutionStrategy.values()) System.out.println(c);
public static ExecutionStrategy valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic void process(OrderedCompositeSpec spec, Optional<java.lang.Object> inputOptional, WalkedPath walkedPath, java.util.Map<java.lang.String,java.lang.Object> output, java.util.Map<java.lang.String,java.lang.Object> context)
abstract void processMap(OrderedCompositeSpec spec, java.util.Map<java.lang.String,java.lang.Object> inputMap, WalkedPath walkedPath, java.util.Map<java.lang.String,java.lang.Object> output, java.util.Map<java.lang.String,java.lang.Object> context)
abstract void processList(OrderedCompositeSpec spec, java.util.List<java.lang.Object> inputList, WalkedPath walkedPath, java.util.Map<java.lang.String,java.lang.Object> output, java.util.Map<java.lang.String,java.lang.Object> context)
abstract void processScalar(OrderedCompositeSpec spec, java.lang.String scalarInput, WalkedPath walkedPath, java.util.Map<java.lang.String,java.lang.Object> output, java.util.Map<java.lang.String,java.lang.Object> context)
private static <T extends OrderedCompositeSpec> void applyKeyToLiteralAndComputed(T spec, java.lang.String subKeyStr, Optional<java.lang.Object> subInputOptional, WalkedPath walkedPath, java.util.Map<java.lang.String,java.lang.Object> output, java.util.Map<java.lang.String,java.lang.Object> context)
private static <T extends BaseSpec> void applyKeyToComputed(java.util.List<T> computedChildren, WalkedPath walkedPath, java.util.Map<java.lang.String,java.lang.Object> output, java.lang.String subKeyStr, Optional<java.lang.Object> subInputOptional, java.util.Map<java.lang.String,java.lang.Object> context)