| 
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.9.1) E67661-01  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
  
oracle.javatools.parser.generic.BraceHelper
public final class 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_BRACEThe index returned for an invalid brace.  | 
| Constructor Summary | |
|---|---|
BraceHelper(Language language)Construct a new BraceHelper instance. | 
|
BraceHelper(java.lang.String[][] languageBraces) | 
|
| 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 definitionpublic BraceHelper(java.lang.String[][] languageBraces)
| Method Detail | 
|---|
public boolean isOpenIndex(int index)
index - the index to validatepublic boolean isCloseIndex(int index)
index - the index to validatepublic int getBraceLength(int index)
index - the brace indexpublic 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
  | 
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.9.1) E67661-01  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||