|
Extension SDK | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectoracle.javatools.parser.generic.BraceHelper
The BraceHelper class is a helper class that can
be used by brace matching implementations for language definitions
based on the Language API.
| Field Summary | |
static int |
INVALID_BRACE
The index returned for an invalid brace. |
| Constructor Summary | |
BraceHelper(Language language)
Construct a new BraceHelper instance. |
|
| Method Summary | |
int |
getBraceIndex(ReadTextBuffer buffer,
int startOffset,
int endOffset)
Fetches the index of the brace at the specified location in the buffer. |
int |
getBraceLength(int index)
Fetches the length of the brace. |
int |
getBracePairsCount()
Fetches the number of matching brace pairs in this language. |
int |
getMatchingBraceIndex(int index)
Fetches the index of the matching brace for the specified index. |
boolean |
isCloseIndex(int index)
Fetch whether the given index is a valid index for a close brace. |
boolean |
isOpenIndex(int index)
Fetch whether the given index is a valid index for an open brace. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int INVALID_BRACE
| Constructor Detail |
public BraceHelper(Language language)
BraceHelper instance.
language - the language definition| Method Detail |
public boolean isOpenIndex(int index)
index - the index to validate
public boolean isCloseIndex(int index)
index - the index to validate
public int getBraceLength(int index)
index - the brace index
public int getBracePairsCount()
public int getBraceIndex(ReadTextBuffer buffer,
int startOffset,
int endOffset)
buffer - the buffer where the brace is locatedstartOffset - the start of the brace (inclusive)endOffset - the end of the brace (exclusive)
public int getMatchingBraceIndex(int index)
index - the index of the brace to get the matching brace index for
|
Extension SDK | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright ©1997, 2003, Oracle. All rights reserved.