public class ComParameter
extends java.lang.Object
implements java.io.Externalizable
Modifier and Type | Class and Description |
---|---|
static class |
ComParameter.DataType
The data type for an AS clause.
|
Modifier and Type | Field and Description |
---|---|
private boolean |
byPointer
Flag matching
true if BY-POINTER option is used. |
private boolean |
byVariantPointer
Flag matching
true if BY-VARIANT-POINTER option is used. |
private ComParameter.DataType |
dataType
Parameter's
AS data-type option, or null if not used. |
private boolean |
extent
Flag identifying if the
value is an extent variable. |
private java.lang.String |
fwdDataType
Used only by the native side, a string representation of this data type, in FWD terms.
|
private int |
length
In case of
extent , the current var's length (can be zero for uninitialized dynamic
extent). |
private char |
mode
The parameter's mode, 'I', 'O' or 'U'.
|
private java.util.function.Consumer<BaseDataType[]> |
refReplacement
The reference replacement in case of output/input-output dynamic extent values.
|
private java.lang.Object |
value
The parameter's value.
|
Modifier | Constructor and Description |
---|---|
|
ComParameter()
Default c'tor.
|
private |
ComParameter(char mode,
java.lang.Object value,
ComParameter.DataType dataType,
boolean byPointer,
boolean byVariantPointer,
java.util.function.Consumer<BaseDataType[]> ref)
Create a new instance with the specified details.
|
(package private) |
ComParameter(ComParameter aparam)
Create a copy of the specified parameter.
|
Modifier and Type | Method and Description |
---|---|
ComParameter.DataType |
getDataType()
Get the
dataType state. |
java.lang.String |
getFwdDataType()
Get the parameter's
fwdDataType . |
int |
getLength()
Get the parameter's length.
|
char |
getMode()
Get the parameter's
mode . |
java.util.function.Consumer<BaseDataType[]> |
getRefReplacement()
Get the reference replacement lambda expression.
|
java.lang.Object |
getValue()
Get the parameter's
value . |
static ComParameter |
input(java.lang.Object value)
Create an INPUT parameter with the specified value.
|
static ComParameter |
input(java.lang.Object value,
boolean isPointer)
Create an INPUT parameter with the specified details.
|
static ComParameter |
input(java.lang.Object value,
boolean isPointer,
java.util.function.Consumer<BaseDataType[]> ref)
Create an INPUT parameter with the specified details.
|
static ComParameter |
input(java.lang.Object value,
ComParameter.DataType dataType)
Create an INPUT parameter with the specified details.
|
static ComParameter |
input(java.lang.Object value,
ComParameter.DataType dataType,
boolean isPointer)
Create an INPUT parameter with the specified details.
|
static ComParameter |
input(java.lang.Object value,
ComParameter.DataType dataType,
boolean isPointer,
java.util.function.Consumer<BaseDataType[]> ref)
Create an INPUT parameter with the specified details.
|
static ComParameter |
input(java.lang.Object value,
ComParameter.DataType dataType,
java.util.function.Consumer<BaseDataType[]> ref)
Create an INPUT parameter with the specified details.
|
static ComParameter |
input(java.lang.Object value,
java.util.function.Consumer<BaseDataType[]> ref)
Create an INPUT parameter with the specified value.
|
static ComParameter |
inputOutput(java.lang.Object value)
Create an INPUT-OUTPUT parameter with the specified value.
|
static ComParameter |
inputOutput(java.lang.Object value,
boolean isPointer)
Create an INPUT-OUTPUT parameter with the specified details.
|
static ComParameter |
inputOutput(java.lang.Object value,
boolean isPointer,
java.util.function.Consumer<BaseDataType[]> ref)
Create an INPUT-OUTPUT parameter with the specified details.
|
static ComParameter |
inputOutput(java.lang.Object value,
ComParameter.DataType dataType)
Create an INPUT-OUTPUT parameter with the specified details.
|
static ComParameter |
inputOutput(java.lang.Object value,
ComParameter.DataType dataType,
boolean isPointer)
Create an INPUT-OUTPUT parameter with the specified details.
|
static ComParameter |
inputOutput(java.lang.Object value,
ComParameter.DataType dataType,
boolean isPointer,
java.util.function.Consumer<BaseDataType[]> ref)
Create an INPUT-OUTPUT parameter with the specified details.
|
static ComParameter |
inputOutput(java.lang.Object value,
ComParameter.DataType dataType,
java.util.function.Consumer<BaseDataType[]> ref)
Create an INPUT-OUTPUT parameter with the specified details.
|
static ComParameter |
inputOutput(java.lang.Object value,
java.util.function.Consumer<BaseDataType[]> ref)
Create an INPUT-OUTPUT parameter with the specified value.
|
boolean |
isByPointer()
Check the
byPointer flag. |
boolean |
isByVariantPointer()
Check the
byVariantPointer flag. |
boolean |
isExtent()
Check if this parameter is an extent parameter.
|
boolean |
isInputOutput()
Check if this is an INPUT-OUTPUT parameter.
|
boolean |
isOutput()
Check if this is an OUTPUT parameter.
|
static ComParameter |
output(java.lang.Object value)
Create an OUTPUT parameter with the specified value.
|
static ComParameter |
output(java.lang.Object value,
boolean isPointer)
Create an OUTPUT parameter with the specified details.
|
static ComParameter |
output(java.lang.Object value,
boolean isPointer,
java.util.function.Consumer<BaseDataType[]> ref)
Create an OUTPUT parameter with the specified details.
|
static ComParameter |
output(java.lang.Object value,
ComParameter.DataType dataType)
Create an OUTPUT parameter with the specified details.
|
static ComParameter |
output(java.lang.Object value,
ComParameter.DataType dataType,
boolean isPointer)
Create an OUTPUT parameter with the specified details.
|
static ComParameter |
output(java.lang.Object value,
ComParameter.DataType dataType,
boolean isPointer,
java.util.function.Consumer<BaseDataType[]> ref)
Create an OUTPUT parameter with the specified details.
|
static ComParameter |
output(java.lang.Object value,
ComParameter.DataType dataType,
java.util.function.Consumer<BaseDataType[]> ref)
Create an OUTPUT parameter with the specified details.
|
static ComParameter |
output(java.lang.Object value,
java.util.function.Consumer<BaseDataType[]> ref)
Create an OUTPUT parameter with the specified value.
|
void |
readExternal(java.io.ObjectInput in)
Replacement for the default object reading method.
|
void |
setByPointer(boolean byPointer)
Set the
byPointer flag. |
void |
setByVariantPointer(boolean byVariantPointer)
Set the
byVariantPointer flag. |
void |
setDataType(ComParameter.DataType dataType)
Set the parameter's
dataType . |
void |
setExtent(boolean extent)
Mark this parameter as an extent.
|
void |
setFwdDataType(java.lang.String fwdDataType)
Set the parameter's
fwdDataType . |
void |
setLength(int length)
Set the length of an
extent parameter. |
void |
setMode(char mode)
Set the parameter's
mode . |
void |
setValue(java.lang.Object value)
Set the parameter's
value . |
void |
writeExternal(java.io.ObjectOutput out)
Replacement for the default object writing method.
|
private char mode
private java.lang.Object value
private boolean byPointer
true
if BY-POINTER
option is used.private boolean byVariantPointer
true
if BY-VARIANT-POINTER
option is used.private ComParameter.DataType dataType
AS data-type
option, or null
if not used.private java.lang.String fwdDataType
private boolean extent
value
is an extent variable.private int length
extent
, the current var's length (can be zero for uninitialized dynamic
extent).private final java.util.function.Consumer<BaseDataType[]> refReplacement
public ComParameter()
ComParameter(ComParameter aparam)
aparam
- Parameter to copy.private ComParameter(char mode, java.lang.Object value, ComParameter.DataType dataType, boolean byPointer, boolean byVariantPointer, java.util.function.Consumer<BaseDataType[]> ref)
mode
- The parameter's mode, 'I', 'O' or 'U'.value
- The parameter's value.dataType
- Parameter's AS data-type
option.byPointer
- Flag matching true
if BY-POINTER
option is used.byVariantPointer
- Flag matching true
if BY-VARIANT-POINTER
option is used.ref
- The reference replacement for dynamic extent variables.public static ComParameter input(java.lang.Object value)
value
- The parameter's value.ComParameter
instance.public static ComParameter output(java.lang.Object value)
value
- The parameter's value.ComParameter
instance.public static ComParameter inputOutput(java.lang.Object value)
value
- The parameter's value.ComParameter
instance.public static ComParameter input(java.lang.Object value, ComParameter.DataType dataType)
value
- The parameter's value.dataType
- Parameter's AS data-type
option.ComParameter
instance.public static ComParameter output(java.lang.Object value, ComParameter.DataType dataType)
value
- The parameter's value.dataType
- Parameter's AS data-type
option.ComParameter
instance.public static ComParameter inputOutput(java.lang.Object value, ComParameter.DataType dataType)
value
- The parameter's value.dataType
- Parameter's AS data-type
option.ComParameter
instance.public static ComParameter input(java.lang.Object value, ComParameter.DataType dataType, boolean isPointer)
value
- The parameter's value.dataType
- Parameter's AS data-type
option.isPointer
- true
represents BY-POINTER
option, false
represents
BY-VARIANT-POINTER
option.ComParameter
instance.public static ComParameter output(java.lang.Object value, ComParameter.DataType dataType, boolean isPointer)
value
- The parameter's value.dataType
- Parameter's AS data-type
option.isPointer
- true
represents BY-POINTER
option, false
represents
BY-VARIANT-POINTER
option.ComParameter
instance.public static ComParameter inputOutput(java.lang.Object value, ComParameter.DataType dataType, boolean isPointer)
value
- The parameter's value.dataType
- Parameter's AS data-type
option.isPointer
- true
represents BY-POINTER
option, false
represents
BY-VARIANT-POINTER
option.ComParameter
instance.public static ComParameter input(java.lang.Object value, boolean isPointer)
value
- The parameter's value.isPointer
- true
represents BY-POINTER
option, false
represents
BY-VARIANT-POINTER
option.ComParameter
instance.public static ComParameter output(java.lang.Object value, boolean isPointer)
value
- The parameter's value.isPointer
- true
represents BY-POINTER
option, false
represents
BY-VARIANT-POINTER
option.ComParameter
instance.public static ComParameter inputOutput(java.lang.Object value, boolean isPointer)
value
- The parameter's value.isPointer
- true
represents BY-POINTER
option, false
represents
BY-VARIANT-POINTER
option.ComParameter
instance.public static ComParameter input(java.lang.Object value, java.util.function.Consumer<BaseDataType[]> ref)
value
- The parameter's value.ref
- The reference replacement for dynamic extent variables.ComParameter
instance.public static ComParameter output(java.lang.Object value, java.util.function.Consumer<BaseDataType[]> ref)
value
- The parameter's value.ref
- The reference replacement for dynamic extent variables.ComParameter
instance.public static ComParameter inputOutput(java.lang.Object value, java.util.function.Consumer<BaseDataType[]> ref)
value
- The parameter's value.ref
- The reference replacement for dynamic extent variables.ComParameter
instance.public static ComParameter input(java.lang.Object value, ComParameter.DataType dataType, java.util.function.Consumer<BaseDataType[]> ref)
value
- The parameter's value.dataType
- Parameter's AS data-type
option.ref
- The reference replacement for dynamic extent variables.ComParameter
instance.public static ComParameter output(java.lang.Object value, ComParameter.DataType dataType, java.util.function.Consumer<BaseDataType[]> ref)
value
- The parameter's value.dataType
- Parameter's AS data-type
option.ref
- The reference replacement for dynamic extent variables.ComParameter
instance.public static ComParameter inputOutput(java.lang.Object value, ComParameter.DataType dataType, java.util.function.Consumer<BaseDataType[]> ref)
value
- The parameter's value.dataType
- Parameter's AS data-type
option.ref
- The reference replacement for dynamic extent variables.ComParameter
instance.public static ComParameter input(java.lang.Object value, ComParameter.DataType dataType, boolean isPointer, java.util.function.Consumer<BaseDataType[]> ref)
value
- The parameter's value.dataType
- Parameter's AS data-type
option.isPointer
- true
represents BY-POINTER
option, false
represents
BY-VARIANT-POINTER
option.ref
- The reference replacement for dynamic extent variables.ComParameter
instance.public static ComParameter output(java.lang.Object value, ComParameter.DataType dataType, boolean isPointer, java.util.function.Consumer<BaseDataType[]> ref)
value
- The parameter's value.dataType
- Parameter's AS data-type
option.isPointer
- true
represents BY-POINTER
option, false
represents
BY-VARIANT-POINTER
option.ref
- The reference replacement for dynamic extent variables.ComParameter
instance.public static ComParameter inputOutput(java.lang.Object value, ComParameter.DataType dataType, boolean isPointer, java.util.function.Consumer<BaseDataType[]> ref)
value
- The parameter's value.dataType
- Parameter's AS data-type
option.isPointer
- true
represents BY-POINTER
option, false
represents
BY-VARIANT-POINTER
option.ref
- The reference replacement for dynamic extent variables.ComParameter
instance.public static ComParameter input(java.lang.Object value, boolean isPointer, java.util.function.Consumer<BaseDataType[]> ref)
value
- The parameter's value.isPointer
- true
represents BY-POINTER
option, false
represents
BY-VARIANT-POINTER
option.ref
- The reference replacement for dynamic extent variables.ComParameter
instance.public static ComParameter output(java.lang.Object value, boolean isPointer, java.util.function.Consumer<BaseDataType[]> ref)
value
- The parameter's value.isPointer
- true
represents BY-POINTER
option, false
represents
BY-VARIANT-POINTER
option.ref
- The reference replacement for dynamic extent variables.ComParameter
instance.public static ComParameter inputOutput(java.lang.Object value, boolean isPointer, java.util.function.Consumer<BaseDataType[]> ref)
value
- The parameter's value.isPointer
- true
represents BY-POINTER
option, false
represents
BY-VARIANT-POINTER
option.ref
- The reference replacement for dynamic extent variables.ComParameter
instance.public boolean isOutput()
public boolean isInputOutput()
public boolean isByPointer()
byPointer
flag.true
if the BY-POINTER
option is used.public void setByPointer(boolean byPointer)
byPointer
flag.byPointer
- true
if the BY-POINTER
option is used.public boolean isByVariantPointer()
byVariantPointer
flag.true
if the BY-VARIANT-POINTER
option is used.public void setByVariantPointer(boolean byVariantPointer)
byVariantPointer
flag.byVariantPointer
- true
if the BY-VARIANT-POINTER
option is used.public ComParameter.DataType getDataType()
dataType
state.null
if no AS data-type
optionpublic void setDataType(ComParameter.DataType dataType)
dataType
.dataType
- The parameter's AS data-type
option or null
if not in use.public java.lang.Object getValue()
value
.public void setValue(java.lang.Object value)
value
.value
- The parameter's value.public char getMode()
mode
.public void setMode(char mode)
mode
. Only 'I', 'U' or 'O' characters are accepted.mode
- The parameter's mode.java.lang.IllegalArgumentException
- If mode
is not one of 'I', 'U' or 'O' characters.public java.lang.String getFwdDataType()
fwdDataType
.public void setFwdDataType(java.lang.String fwdDataType)
fwdDataType
.fwdDataType
- The FWD data-type name.for possible types.
public boolean isExtent()
public void setExtent(boolean extent)
extent
- true
if this is an extent variable.public int getLength()
extent
is true.public java.util.function.Consumer<BaseDataType[]> getRefReplacement()
public void setLength(int length)
extent
parameter.length
- The array length.public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException
writeExternal
in interface java.io.Externalizable
out
- The output destination to which fields will be saved.java.io.IOException
- In case of I/O errors.public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException
readExternal
in interface java.io.Externalizable
in
- The input source from which fields will be restored.java.io.IOException
- In case of I/O errors.java.lang.ClassNotFoundException
- If payload can't be instantiated.