|
org.netbeans.modules.editor.lib/1 1.14.0 3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netbeans.editor.TokenContextPath
public final class TokenContextPath
Immutable and 'interned' wrapper holding an array of the contexts starting with the original context in which the token is defined and ending with the target context from which the token is being returned. It is final and has no public constructor. The only entrypoint is through the get() method. It's guaranteed that the two context-paths containing the same contexts in the same order are the same objects and the equal-operator can be used instead of calling equals().
Method Summary | |
---|---|
boolean |
contains(TokenContextPath tcp)
Does this path contain the given path. |
TokenContextPath |
getBase()
Get the base path which corresponds to only the first context in the context-array. |
TokenContext[] |
getContexts()
Retrieve the contexts of this context-path. |
String |
getFullTokenName(TokenCategory tokenIDOrCategory)
Get the token-name with the name-prefix of this context-path. |
String |
getNamePrefix()
Get the prefix that this context adds to the name of its tokens. |
TokenContextPath |
getParent()
Get parent context-path that consists of all the contexts of this path except the last one. |
int |
length()
Get the length of the path returning the length of the contexts array. |
TokenContextPath |
replaceStart(TokenContextPath byPath)
Get the path which has the initial part of the path (usually only the base path) replaced by the given path. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public TokenContext[] getContexts()
public int length()
public TokenContextPath getParent()
public TokenContextPath getBase()
public boolean contains(TokenContextPath tcp)
public TokenContextPath replaceStart(TokenContextPath byPath)
byPath
- path that will replace the initial portion
of this path. The length of the portion is the same as the length
of this parameter.
public String getNamePrefix()
public String getFullTokenName(TokenCategory tokenIDOrCategory)
public String toString()
|
org.netbeans.modules.editor.lib/1 1.14.0 3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |