public interface SymbolToken
SymbolTable
.
Any instance will have at least one of the two properties defined.
WARNING: This interface should not be implemented or extended by code outside of this library.
Modifier and Type | Field and Description |
---|---|
static SymbolToken[] |
EMPTY_ARRAY
A zero-length array.
|
Modifier and Type | Method and Description |
---|---|
String |
assumeText()
Gets the text of this symbol, throwing an exception if its unknown.
|
int |
getSid()
Gets the ID of this symbol token.
|
String |
getText()
Gets the text of this symbol.
|
static final SymbolToken[] EMPTY_ARRAY
String getText()
If the text is not known (usually due to a shared symbol table being
unavailable) then this method returns null.
In such cases getSid()
will be non-negative.
String assumeText()
UnknownSymbolException
- if the symbol text isn't known.int getSid()
If no ID has yet been assigned (as may be the case when processing Ion
text-formatted data), this method returns
SymbolTable.UNKNOWN_SYMBOL_ID
.
In such cases getText()
will be non-null.
SymbolTable.UNKNOWN_SYMBOL_ID
if the sid is unknown.