|
org.netbeans.modules.lexer/2 1.19.0 1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netbeans.api.lexer.TokenChange<T>
Token change describes modification on one level of a token hierarchy.
If there is only one token that was modified
and there was a language embedding in that token then
most of the embedded tokens can usually be retained.
This defines an embedded change accessible by embeddedChange(int)
.
There may possibly be multiple levels of the embedded changes.
Method Summary | ||
---|---|---|
int |
addedTokenCount()
Get number of the tokens added by this token change. |
|
TokenSequence<T> |
currentTokenSequence()
Get the token sequence that corresponds to the current state of the token hierarchy. |
|
TokenChange<? extends TokenId> |
embeddedChange(int index)
Get embedded change at the given index. |
|
|
embeddedChange(Language<T> language)
Get embedded token change of the given type. |
|
int |
embeddedChangeCount()
Get number of embedded changes contained in this change. |
|
int |
index()
Get index of the first token being modified. |
|
boolean |
isBoundsChange()
Whether this change only modifies bounds of a single token. |
|
Language<T> |
language()
Get the language describing token ids used by tokens contained in this token change. |
|
LanguagePath |
languagePath()
Get the complete language path of the tokens contained in this token sequence (containing outer language levels as well). |
|
int |
offset()
Get offset of the first token that was modified. |
|
int |
removedTokenCount()
Get number of removed tokens contained in this token change. |
|
TokenSequence<T> |
removedTokenSequence()
Create token sequence over the removed tokens. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public int embeddedChangeCount()
public TokenChange<? extends TokenId> embeddedChange(int index)
index
- 0 <= index <= embeddedChangeCount() index of the embedded change.
public <T extends TokenId> TokenChange<T> embeddedChange(Language<T> language)
(embedded().language() == language)
.
Null is returned otherwise.public Language<T> language()
public LanguagePath languagePath()
public int index()
public int offset()
public int removedTokenCount()
public TokenSequence<T> removedTokenSequence()
There is no analogy of this method for the added tokens.
The currentTokenSequence()
may be used for exploration
of the current token sequence at this level.
public int addedTokenCount()
public TokenSequence<T> currentTokenSequence()
index()
.
public boolean isBoundsChange()
|
org.netbeans.modules.lexer/2 1.19.0 1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |