Top Fields Constructors Methods
io.github.kusoroadeolu.veneer.utils

public final Record FragmentToken

extends Record
implements Token
Class Inheritance
All Implemented Interfaces
org.antlr.v4.runtime.Token
Record Components
origin:Token 
text:String 
Imports
org.antlr.v4.runtime.CharStream, .Token, .TokenSource

Field Summary

Modifier and TypeField and Description
private final Token
origin

Record Component accessed by origin().

private final String
text

Record Component accessed by text().

Constructor Summary

AccessConstructor and Description
public
FragmentToken(Token origin, String text)

Method Summary

Modifier and TypeMethod and Description
public final boolean
equals(Object o)

Implements abstract java.lang.Record.equals.

Indicates whether some other object is "equal to" this one.

public int
getChannel()

Implements org.antlr.v4.runtime.Token.getChannel.

Return the channel this token.

public int
getCharPositionInLine()

Implements org.antlr.v4.runtime.Token.getCharPositionInLine.

The index of the first character of this token relative to the beginning of the line at which it occurs, 0..n-1

public CharStream
getInputStream()

Implements org.antlr.v4.runtime.Token.getInputStream.

Gets the CharStream from which this token was derived.

public int
getLine()

Implements org.antlr.v4.runtime.Token.getLine.

The line number on which the 1st character of this token was matched, line=1..n

public int
getStartIndex()

Implements org.antlr.v4.runtime.Token.getStartIndex.

The starting character index of the token This method is optional; return -1 if not implemented.

public int
getStopIndex()

Implements org.antlr.v4.runtime.Token.getStopIndex.

The last character index of the token.

public String
getText()

Implements org.antlr.v4.runtime.Token.getText.

Get the text of the token.

public int
getTokenIndex()

Implements org.antlr.v4.runtime.Token.getTokenIndex.

An index from 0..n-1 of the token object in the input stream.

public TokenSource
getTokenSource()

Implements org.antlr.v4.runtime.Token.getTokenSource.

Gets the TokenSource which created this token.

public int
getType()

Implements org.antlr.v4.runtime.Token.getType.

Get the token type of the token

public final int
hashCode()

Implements abstract java.lang.Record.hashCode.

Returns a hash code value for the record.

public Token
origin()

Record Component getter of origin.

public String
text()

Record Component getter of text.

public final String
toString()

Implements abstract java.lang.Record.toString.

Returns a string representation of the record.

Field Detail

originback to summary
private final Token origin

Record Component accessed by origin().

textback to summary
private final String text

Record Component accessed by text().

Constructor Detail

FragmentTokenback to summary
public FragmentToken(Token origin, String text)

Method Detail

equalsback to summary
public final boolean equals(Object o)

Implements abstract java.lang.Record.equals.

Doc from java.lang.Record.equals.

Indicates whether some other object is "equal to" this one. In addition to the general contract of Object.equals, record classes must further obey the invariant that when a record instance is "copied" by passing the result of the record component accessor methods to the canonical constructor, as follows:

    R copy = new R(r.c1(), r.c2(), ..., r.cn());
then it must be the case that r.equals(copy).
getChannelback to summary
public int getChannel()

Implements org.antlr.v4.runtime.Token.getChannel.

Doc from org.antlr.v4.runtime.Token.getChannel.

Return the channel this token. Each token can arrive at the parser on a different channel, but the parser only "tunes" to a single channel. The parser ignores everything not on DEFAULT_CHANNEL.

Annotations
@Override
getCharPositionInLineback to summary
public int getCharPositionInLine()

Implements org.antlr.v4.runtime.Token.getCharPositionInLine.

Doc from org.antlr.v4.runtime.Token.getCharPositionInLine.

The index of the first character of this token relative to the beginning of the line at which it occurs, 0..n-1

Annotations
@Override
getInputStreamback to summary
public CharStream getInputStream()

Implements org.antlr.v4.runtime.Token.getInputStream.

Doc from org.antlr.v4.runtime.Token.getInputStream.

Gets the CharStream from which this token was derived.

Annotations
@Override
getLineback to summary
public int getLine()

Implements org.antlr.v4.runtime.Token.getLine.

Doc from org.antlr.v4.runtime.Token.getLine.

The line number on which the 1st character of this token was matched, line=1..n

Annotations
@Override
getStartIndexback to summary
public int getStartIndex()

Implements org.antlr.v4.runtime.Token.getStartIndex.

Doc from org.antlr.v4.runtime.Token.getStartIndex.

The starting character index of the token This method is optional; return -1 if not implemented.

Annotations
@Override
getStopIndexback to summary
public int getStopIndex()

Implements org.antlr.v4.runtime.Token.getStopIndex.

Doc from org.antlr.v4.runtime.Token.getStopIndex.

The last character index of the token. This method is optional; return -1 if not implemented.

Annotations
@Override
getTextback to summary
public String getText()

Implements org.antlr.v4.runtime.Token.getText.

Doc from org.antlr.v4.runtime.Token.getText.

Get the text of the token.

Annotations
@Override
getTokenIndexback to summary
public int getTokenIndex()

Implements org.antlr.v4.runtime.Token.getTokenIndex.

Doc from org.antlr.v4.runtime.Token.getTokenIndex.

An index from 0..n-1 of the token object in the input stream. This must be valid in order to print token streams and use TokenRewriteStream. Return -1 to indicate that this token was conjured up since it doesn't have a valid index.

Annotations
@Override
getTokenSourceback to summary
public TokenSource getTokenSource()

Implements org.antlr.v4.runtime.Token.getTokenSource.

Doc from org.antlr.v4.runtime.Token.getTokenSource.

Gets the TokenSource which created this token.

Annotations
@Override
getTypeback to summary
public int getType()

Implements org.antlr.v4.runtime.Token.getType.

Doc from org.antlr.v4.runtime.Token.getType.

Get the token type of the token

Annotations
@Override
hashCodeback to summary
public final int hashCode()

Implements abstract java.lang.Record.hashCode.

Doc from java.lang.Record.hashCode.

Returns a hash code value for the record. Obeys the general contract of Object.hashCode. For records, hashing behavior is constrained by the refined contract of Record.equals, so that any two records created from the same components must have the same hash code.

originback to summary
public Token origin()

Record Component getter of origin.

textback to summary
public String text()

Record Component getter of text.

toStringback to summary
public final String toString()

Implements abstract java.lang.Record.toString.

Doc from java.lang.Record.toString.

Returns a string representation of the record. In accordance with the general contract of Object#toString(), the toString method returns a string that "textually represents" this record. The result should be a concise but informative representation that is easy for a person to read.

In addition to this general contract, record classes must further participate in the invariant that any two records which are equal must produce equal strings. This invariant is necessarily relaxed in the rare case where corresponding equal component values might fail to produce equal strings for themselves.