public static class RexxScriptEngine.RexxAnnotation
extends java.lang.Object
A Rexx script annotation is a block comment at the very beginning or end of a Rexx statement, which starts with the at character (@) and followed by a name. Optionally the name may be followed by a pair of parenthesis that may contain a single (quoted) Rexx string, which gets interpreted according to the annotation name in hand.
Currently the following Rexx script annotations are defined:
Modifier and Type | Class and Description |
---|---|
static class |
RexxScriptEngine.RexxAnnotation.RexxAnnotationEnum
The currently supported Rexx script annotation names need to be led in with an at (@) character,
the name of the annotation and if values are supplied with it, then they must be given within
parenthesis immediately following the annotation name.
|
Modifier and Type | Field and Description |
---|---|
(package private) RexxScriptEngine.RexxAnnotation.RexxAnnotationEnum |
annotation
Stores the Rexx script annotation's Enum value.
|
(package private) java.lang.String |
contentAsIs
Stores the content as is.
|
(package private) java.lang.String |
contentAsRexxString
Stores the content as a properly quoted Rexx string.
|
(package private) char |
contentFirstChar
Stores the first non-blank character after the open parenthesis character.
|
(package private) int |
contentFirstCharPos
Stores the character position where the first non-blank character after the open parenthesis is located.
|
(package private) char |
contentLastChar
Stores the last non-blank character before the close parenthesis character.
|
(package private) int |
contentLastCharPos
Stores the character position where the last non-blank character before the close parenthesis is located.
|
(package private) boolean |
isAnnotationWithinBlockCommentOnSameLine
Indicates whether the annotation is on the same line as the opening Rexx block comment and possesses
a matching closing Rexx block comment.
|
(package private) boolean |
isContentProperlyQuoted
Indicates whether the content represents a properly quoted Rexx string.
|
(package private) int |
posCloseParenthesis
Stores the character position of the close parenthesis character.
|
(package private) int |
posEndAnnotationChar
Stores the character position where the annotation name ends.
|
(package private) int |
posEndBlockComment
Stores the character position where a Rexx block comment ends.
|
(package private) int |
posOpenParenthesis
Stores the character position of the open parenthesis character.
|
(package private) int |
posStartAnnotationChar
Stores the character position where the annotation name starts.
|
(package private) int |
posStartAtChar
Stores the character position of the at (@) character.
|
(package private) int |
posStartBlockComment
Stores the character position where a Rexx block comment starts.
|
Constructor and Description |
---|
RexxAnnotation(java.lang.String script,
java.lang.String name,
int startPos)
The constructor parses the
script argument for Rexx script
annotations matching the name argument, starting with the
startPos argument. |
Modifier and Type | Method and Description |
---|---|
(package private) void |
parseAnnotation(java.lang.String script,
java.lang.String name,
int scriptLength)
Determine whether we have a RexxScriptAnnotation (@showSource, @get(...), @set(...)),
and if so fill-in the correct values in our fields.
|
java.lang.String |
toString()
Create a string containing all attributes and their values.
|
int posStartBlockComment
int posEndBlockComment
int posStartAtChar
int posStartAnnotationChar
int posEndAnnotationChar
int posOpenParenthesis
int posCloseParenthesis
char contentFirstChar
int contentFirstCharPos
char contentLastChar
int contentLastCharPos
boolean isContentProperlyQuoted
java.lang.String contentAsIs
java.lang.String contentAsRexxString
boolean isAnnotationWithinBlockCommentOnSameLine
RexxScriptEngine.RexxAnnotation.RexxAnnotationEnum annotation
RexxAnnotation(java.lang.String script, java.lang.String name, int startPos)
script
argument for Rexx script
annotations matching the name
argument, starting with the
startPos
argument.script
- the Rexx script to parsename
- the name of the Rexx script annotation, case does not matterstartPos
- the position in the script to start parsingvoid parseAnnotation(java.lang.String script, java.lang.String name, int scriptLength)
script
- the Rexx script to parsename
- the name of the Rexx script annotation, case does not matterscriptLength
- the total length of the script to parsepublic java.lang.String toString()
toString
in class java.lang.Object