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 |
mode
The mode of this parameter, one of INPUT, OUTPUT or INPUT-OUTPUT or RETURN.
|
private java.lang.String |
pname
Legacy 4GL name for this parameter.
|
private java.lang.String |
qualified
If this parameter's type is
object , then this holds the qualified legacy class
name. |
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 type,
java.lang.String mode)
Basic c'tor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Check if the specified object matches this instance.
|
java.lang.String |
getAttribute(java.lang.String attr)
Get the value of the given attribute.
|
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 |
getQualified()
Get the
qualified member. |
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 SourceNameMapper.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.
|
void |
setQualified(java.lang.String qualified)
Initialize the
qualified member based on a text input. |
private static final java.util.Set<java.lang.String> validModes
private final java.lang.String pname
private final java.lang.String type
private final java.lang.String mode
private java.lang.String qualified
object
, then this holds the qualified legacy class
name.private java.util.Map<java.lang.String,java.lang.String> attributes
private int extent
SourceNameMapper.DYNAMIC_EXTENT
,
dynamic extent is used. If set to SourceNameMapper.NO_EXTENT
, no extent is used.public Parameter(java.lang.String pname, java.lang.String type, java.lang.String mode)
pname
- Legacy 4GL 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 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 SourceNameMapper.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 SourceNameMapper.NO_EXTENT
.public void setQualified(java.lang.String qualified)
qualified
member based on a text input.qualified
- The qualified legacy OO class name of this type, or null
if it does
not apply.public java.lang.String getQualified()
qualified
member.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- The object to match.