Token object representing a token of a particular type; e.g.,
<ID>. These tokens are created for TagChunk chunks where the
tag corresponds to a lexer rule or token type.
| Modifier and Type | Field and Description |
|---|---|
| private final String | |
| private final String | tokenName
This is the backing field for |
| Access | Constructor and Description |
|---|---|
| public | TokenTagToken(String
The token name. tokenName, int The token type. type)Constructs a new instance of |
| public | TokenTagToken(String
The token name. tokenName, int The token type. type, String The label associated with the token tag, or label)null if
the token tag is unlabeled.Constructs a new instance of |
| Modifier and Type | Method and Description |
|---|---|
| public final String | Returns: The name of the label associated with the rule tag, ornull if this is an unlabeled rule tag.Gets the label associated with the rule tag. |
| public String | getText()
Overrides org. Implements org. |
| public final String | |
| public String | toString()
Overrides org. |
| label | back to summary |
|---|---|
| private final String label This is the backing field for | |
| tokenName | back to summary |
|---|---|
| private final String tokenName This is the backing field for | |
| TokenTagToken | back to summary |
|---|---|
| public TokenTagToken(String tokenName, int type) Constructs a new instance of
| |
| TokenTagToken | back to summary |
|---|---|
| public TokenTagToken(String tokenName, int type, String label) Constructs a new instance of | |
| getLabel | back to summary |
|---|---|
| public final String getLabel() Gets the label associated with the rule tag. | |
| getText | back to summary |
|---|---|
| public String getText() Overrides org. Implements org. Doc from org. Get the text of the token. The implementation for
| |
| getTokenName | back to summary |
|---|---|
| public final String getTokenName() Gets the token name. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides org. Doc from java. Returns a string representation of the object. The implementation for | |