public class InternalEntry
extends java.lang.Object
The methods of this class are unsynchronized because the methods of this class are invoked
very frequently and testing and profiling indicates that a synchronized architecture creates
a bottleneck. Instances of this class are only (and MUST only) be constructed and initialized
from within synchronized code within SourceNameMapper
. Although there are public
methods in this class which access internal state, they are only invoked after all internal
state has been set. Subclasses must be aware of this restriction to ensure they are thread
safe.
Modifier and Type | Class and Description |
---|---|
static class |
InternalEntry.Type
Type of internal entry
|
Modifier and Type | Field and Description |
---|---|
private java.util.Map<java.lang.String,java.lang.String> |
attributes
A map containing all the internal entry's attributes.
|
static char |
BUFFER_MODE
Identify buffer parameters.
|
private java.lang.Boolean |
inHandle
Flag indicating if this is a IN handle internal entry (when set to
true ). |
static char |
INPUT_MODE
Identify parameters in INPUT mode.
|
static char |
INPUT_OUTPUT_MODE
Identify parameters in INPUT-OUTPUT mode.
|
private java.lang.Boolean |
isPrivate
Flag indicating if this is a PRIVATE internal entry (when set to
true ). |
private java.lang.Boolean |
isSuper
Flag indicating if this is a IN SUPER internal entry (when set to
true ). |
(package private) java.lang.String |
jname
Converted Java name for this internal-entry.
|
static char |
OUTPUT_MODE
Identify parameters in OUTPUT mode.
|
private java.lang.String |
parameterModes
The string representation of the parameter modes for this internal entry.
|
private java.util.List<Parameter> |
parameters
The parameter list of this internal entry.
|
(package private) java.lang.String |
pname
Legacy 4GL name for this internal-entry.
|
private java.lang.String |
signature
The signature of this internal entry, as returned by the
get-signature 4GL API. |
private InternalEntry.Type |
type
The type of this internal entry.
|
Modifier | Constructor and Description |
---|---|
protected |
InternalEntry(java.lang.String pname,
java.lang.String jname,
InternalEntry.Type type)
Basic c'tor.
|
protected |
InternalEntry(java.lang.String pname,
java.lang.String jname,
java.lang.String type)
Basic c'tor.
|
Modifier and Type | Method and Description |
---|---|
private java.lang.String |
buildSignature()
Build the 4GL-style signature of this instance.
|
java.lang.String |
getAttribute(java.lang.String attr)
Get the value of the given attribute.
|
java.lang.String |
getLegacyName()
Obtain the original name of the procedure being executed as specified in the 4GL
code.
|
Parameter |
getParameter(int idx)
Gets the details of the given parameter.
|
java.util.List<Parameter> |
getParameterList()
Returns the list of parameters for this internal entry.
|
int |
getParameterListSize()
Returns the number of parameters for this internal entry.
|
java.lang.String |
getParameterModes()
Gets the string representation of the parameter modes for
internal-entry.
|
java.util.List<Parameter> |
getParameters()
Gets the parameters for this internal entry.
|
java.lang.String |
getSignature()
Gets the signature of this internal-entry, as returned by the
get-signature
API of an persistent procedure. |
(package private) void |
initialize()
Initialize this object's internal state.
|
boolean |
isFunction()
|
boolean |
isInHandle()
Return
true if this internal-entry has its
in-handle attribute set to "true" . |
static boolean |
isOutputMode(char mode)
Check if the given mode is an OUTPUT mode (i.e.
|
boolean |
isPrivate()
Return
true if this internal-entry has its
private attribute set to "true" . |
boolean |
isSuper()
Return
true if this internal-entry has its in-super attribute set
to "true" . |
void |
putAttribute(java.lang.String name,
java.lang.String value)
Set the value of the given attribute.
|
(package private) void |
setParameterList(java.util.List<Parameter> parameters)
Sets the list of parameters for this internal entry.
|
public static final char INPUT_MODE
public static final char INPUT_OUTPUT_MODE
public static final char OUTPUT_MODE
public static final char BUFFER_MODE
final java.lang.String pname
final java.lang.String jname
private final InternalEntry.Type type
private java.lang.String signature
get-signature
4GL API.private java.lang.String parameterModes
private java.util.List<Parameter> parameters
private java.util.Map<java.lang.String,java.lang.String> attributes
private java.lang.Boolean isSuper
true
).
Gets its permanent value when internal entry is initialized by SourceNameMapper
.private java.lang.Boolean inHandle
true
).
Gets its permanent value when internal entry is initialized by SourceNameMapper
.private java.lang.Boolean isPrivate
true
).
Gets its permanent value when internal entry is initialized by SourceNameMapper
.protected InternalEntry(java.lang.String pname, java.lang.String jname, java.lang.String type)
pname
- Legacy 4GL name for this internal-entry.jname
- Converted Java name for this internal-entry.type
- The type of this internal entry.protected InternalEntry(java.lang.String pname, java.lang.String jname, InternalEntry.Type type)
pname
- Legacy 4GL name for this internal-entry.jname
- Converted Java name for this internal-entry.type
- The type of this internal entry.public static boolean isOutputMode(char mode)
OUTPUT_MODE
or
INPUT_OUTPUT_MODE
.true
if the given character represents one of the output
modes.public boolean isSuper()
true
if this internal-entry has its in-super
attribute set
to "true"
.public boolean isPrivate()
true
if this internal-entry has its
private
attribute set to "true"
.public boolean isFunction()
public boolean isInHandle()
true
if this internal-entry has its
in-handle
attribute set to "true"
.public java.lang.String getLegacyName()
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 getSignature()
get-signature
API of an persistent procedure. If this is the first access, it initializes the
signature
field.public Parameter getParameter(int idx)
idx
- 0-based parameter index.null
if no such parameter exists.public int getParameterListSize()
public java.util.List<Parameter> getParameterList()
public java.lang.String getParameterModes()
parameterModes
field.public java.util.List<Parameter> getParameters()
void setParameterList(java.util.List<Parameter> parameters)
parameters
- The parameter list.void initialize()
isSuper()
is possible.
This is done within synchronized code in SourceNameMapper
, such that the creation
of this object and initialization of this state is atomic from a concurrency perspective.private java.lang.String buildSignature()