private static class ControlFlowOps.MapArgumentResolver extends java.lang.Object implements ControlFlowOps.ArgumentResolver
Map
, where
the key is the legacy argument's name (case insensitive) and the value is a string-encoded
representation of this argument.
When resolving the arguments, they are matched against the caller's signature and an array
is constructed, so that the argument order matches the caller's signature. If an argument
is not specified in the map
, an unknown value is assumed for it.
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,java.lang.String> |
args
The argument map.
|
private java.util.Set<java.lang.String> |
outputArguments
A set of 4GL legacy parameter names, which are marked as OUTPUT or INPUT-OUTPUT.
|
private java.util.Map<java.lang.String,BaseDataType> |
resolvedArgs
The
args converted/casted to their associated P2J type. |
private static java.util.Map<java.lang.String,java.lang.Class<? extends BaseDataType>> |
SUPPORTED_TYPES
A map with string representation of the 4GL supported types to their P2J implementation
class.
|
Constructor and Description |
---|
MapArgumentResolver(java.util.Map<java.lang.String,java.lang.String> args)
Create a new instance.
|
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.String> |
getOutputArguments()
Get a map with the OUTPUT or INPUT-OUTPUT arguments, with their state as after the caller
has been executed.
|
java.lang.Object[] |
resolve(ControlFlowOps.InternalEntryCaller caller,
java.lang.String name,
boolean function)
Resolve the arguments which will be passed to the caller.
|
private static final java.util.Map<java.lang.String,java.lang.Class<? extends BaseDataType>> SUPPORTED_TYPES
private final java.util.Map<java.lang.String,java.lang.String> args
private final java.util.Map<java.lang.String,BaseDataType> resolvedArgs
args
converted/casted to their associated P2J type.private java.util.Set<java.lang.String> outputArguments
public MapArgumentResolver(java.util.Map<java.lang.String,java.lang.String> args)
args
- The map of arguments.public java.lang.Object[] resolve(ControlFlowOps.InternalEntryCaller caller, java.lang.String name, boolean function)
resolve
in interface ControlFlowOps.ArgumentResolver
caller
- The resolved caller, to which the arguments will be passed.name
- The caller's legacy name.function
- Flag indicating if this is a 4GL function call (when true
).ErrorConditionException
- If the arguments can't be matched against the caller's signature (by number,
name or type).public java.util.Map<java.lang.String,java.lang.String> getOutputArguments()