public class Parameter
extends java.lang.Object
InternalEntry
parameter.Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,java.lang.String> |
attributes
A map containing all the parameter's attributes.
|
private int |
extent
Extent setting of this parameter.
|
private java.lang.String |
jname
Converted Java name for this parameter.
|
private java.lang.String |
mode
The mode of this parameter, one of INPUT, OUTPUT or INPUT-OUTPUT or RETURN.
|
private static int |
PARAM_DYNAMIC_EXTENT
Constant identifying dynamic-extent parameters.
|
private static int |
PARAM_NO_EXTENT
Constant identifying no-extent parameters.
|
private java.lang.String |
pname
Legacy 4GL name for this parameter.
|
private java.lang.String |
type
The 4GL-style parameter type.
|
private static java.util.Set<java.lang.String> |
validModes
The set of all valid modes.
|
Constructor and Description |
---|
Parameter(java.lang.String pname,
java.lang.String jname,
java.lang.String type,
java.lang.String mode)
Basic c'tor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getAttribute(java.lang.String attr)
Get the value of the given attribute.
|
java.lang.String |
getConvertedName()
Get the converted name.
|
int |
getExtent()
Obtain the extent of this parameter.
|
java.lang.String |
getLegacyName()
Get the legacy 4GL name.
|
java.lang.String |
getMode()
Get the unmodified mode name.
|
java.lang.String |
getSignatureMode()
Get the value of the mode in a form that is acceptable for displaying in the
internal entry's signature.
|
java.lang.String |
getType()
Get the data type name.
|
boolean |
isDynamicExtent()
Check if this parameter is dynamic extent (
true only
when the extent field is set to PARAM_DYNAMIC_EXTENT . |
boolean |
isExtent()
Check if this parameter is an extent parameter (fixed or dynamic).
|
boolean |
isFixedExtent()
Check if this parameter is fixed-size extent (
true only
when the extent field greater than 0}. |
void |
putAttribute(java.lang.String name,
java.lang.String value)
Set the value of the given attribute.
|
void |
setExtent(java.lang.String extent)
Initialize the extent member based on a text input.
|
private static final int PARAM_NO_EXTENT
private static final int PARAM_DYNAMIC_EXTENT
private static final java.util.Set<java.lang.String> validModes
private final java.lang.String pname
private final java.lang.String jname
private final java.lang.String type
private final java.lang.String mode
private java.util.Map<java.lang.String,java.lang.String> attributes
private int extent
PARAM_DYNAMIC_EXTENT
, dynamic extent
is used. If set to PARAM_NO_EXTENT
, no extent is used.public Parameter(java.lang.String pname, java.lang.String jname, java.lang.String type, java.lang.String mode)
pname
- Legacy 4GL name for this parameter.jname
- Converted Java name for this parameter.type
- The 4GL-style parameter type.mode
- The mode of this parameter, one of INPUT, OUTPUT or
INPUT-OUTPUT.public java.lang.String getLegacyName()
public java.lang.String getConvertedName()
public java.lang.String getMode()
public java.lang.String getType()
public java.lang.String getAttribute(java.lang.String attr)
null
.attr
- The attribute's name.public void putAttribute(java.lang.String name, java.lang.String value)
name
- The attribute's name.value
- The attribute's value.public java.lang.String getSignatureMode()
public boolean isDynamicExtent()
true
only
when the extent
field is set to PARAM_DYNAMIC_EXTENT
.true
if this is a dynamic-extent parameter.public boolean isFixedExtent()
true
only
when the extent
field greater than 0}.true
if this is a fixed-size extent parameter.public boolean isExtent()
true
if this is an extent parameter.public int getExtent()
public void setExtent(java.lang.String extent)
extent
- A valid integer specifying the extent or null
to set the default
to PARAM_NO_EXTENT
.