public class IlrHeaderStatement extends IlrStatement
A header could be anything printed before the actual generated code.
Currently, the only predefined headers are IRL 'use' clause and
IRL 'import' clause.
If you wish to create a new kind of header, you should set a kind
starting from CUSTOM_EXTENSION.
| Modifier and Type | Field and Description |
|---|---|
static int |
COMMENT
Constant for defining a
IlrHeaderStatement of type "comment" (value is 2). |
static int |
CUSTOM_EXTENSION
Constant for defining a custom kind of
IlrHeaderStatement (value is 10). |
static int |
USE
Constant for defining an
IlrHeaderStatement of type "use" (value is 0). |
| Constructor and Description |
|---|
IlrHeaderStatement(IlrSyntaxTree.Node node,
java.lang.String value)
Creates a new
IlrHeaderStatement with the specified node and
value. |
IlrHeaderStatement(IlrSyntaxTree.Node node,
java.lang.String value,
int kind)
Creates a new
IlrHeaderStatement with the specified node,
value and kind. |
| Modifier and Type | Method and Description |
|---|---|
int |
getKind()
Gets the kind of this header statement.
|
java.lang.String |
getValue()
Gets the value string of this header statement.
|
void |
setKind(int kind)
Sets the kind of this header statement.
|
void |
setValue(java.lang.String value)
Sets the value string of this header statement.
|
accept, getNode, hasTagpublic static final int USE
IlrHeaderStatement of type "use" (value is 0).public static final int COMMENT
IlrHeaderStatement of type "comment" (value is 2).public static final int CUSTOM_EXTENSION
IlrHeaderStatement (value is 10).public IlrHeaderStatement(IlrSyntaxTree.Node node, java.lang.String value)
IlrHeaderStatement with the specified node and
value. The kind of such an header statement is USE.node - The node.value - The value.public IlrHeaderStatement(IlrSyntaxTree.Node node, java.lang.String value, int kind)
IlrHeaderStatement with the specified node,
value and kind.node - The node.value - The value.kind - The kind of header statement.public int getKind()
public void setKind(int kind)
kind - The kind of this header statement.public java.lang.String getValue()
public void setValue(java.lang.String value)
value - The new value string.© Copyright IBM Corp. 1987, 2017