|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.1.0) E13403-02 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectoracle.javatools.parser.java.v1.JavaParser
public class JavaParser
The JavaParser is the entry point for the Java parser API. It presents a clean API (hiding the parsing algorithm) for clients who want to do Java parsing. Clients pass in a ReadTextBuffer object (usually a TextBuffer object) and sometimes ParsingOptions. The JavaParser may return any of the following based on the parsing options: RootSymbol, CodeBlockSymbol, ExpressionSymbol, or null.
JavaLexer
,
RootSymbol
,
CodeBlockSymbol
,
ExpressionSymbol
Nested Class Summary | |
---|---|
static class |
JavaParser.ParsingOptions
ParsingOptions is an encapsulation of the various parsing options available in the JavaParser. |
Field Summary | |
---|---|
static int |
DEPTH_FULL
Parse depth. |
static int |
DEPTH_IMPORTS
Parse depth. |
static int |
DEPTH_MEMBERS
Parse depth. |
static boolean |
ERRORS_CHOKE
Error handling. |
static boolean |
ERRORS_REPORT
Error handling. |
static int |
INPUT_BLOCK
Input type. |
static int |
INPUT_EXPR
Input type. |
static int |
INPUT_JAVA_FILE
Input type. |
Constructor Summary | |
---|---|
JavaParser()
|
Method Summary | |
---|---|
static RootSymbol |
parse(ReadTextBuffer buffer)
This is the simple default parse call that will be used by most clients. |
static JavaSymbol |
parse(ReadTextBuffer buffer,
JavaParser.ParsingOptions options)
This will parse the buffer with the provided options. |
static CodeBlockSymbol |
parseInto(ReadTextBuffer buffer,
CodeBlockSymbol symbol,
boolean reportErrors)
This will parse into the specified CodeBlockSymbol from a previous DEPTH_MEMBERS parse. |
static ExpressionSymbol |
parseInto(ReadTextBuffer buffer,
ExpressionSymbol symbol,
boolean reportErrors)
This will parse into the specified ExpressionSymbol from a previous DEPTH_MEMBERS parse. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean ERRORS_CHOKE
public static final boolean ERRORS_REPORT
public static final int INPUT_JAVA_FILE
public static final int INPUT_BLOCK
public static final int INPUT_EXPR
public static final int DEPTH_MEMBERS
public static final int DEPTH_IMPORTS
public static final int DEPTH_FULL
Constructor Detail |
---|
public JavaParser()
Method Detail |
---|
public static RootSymbol parse(ReadTextBuffer buffer)
buffer
- the ReadTextBuffer input
public static JavaSymbol parse(ReadTextBuffer buffer, JavaParser.ParsingOptions options)
buffer
- the ReadTextBuffer inputoptions
- the parsing options to use
public static CodeBlockSymbol parseInto(ReadTextBuffer buffer, CodeBlockSymbol symbol, boolean reportErrors)
Clients may utilize this for reparsing if the contents of the buffer change so long as they track the starting offset of the code block.
buffer
- the ReadTextBuffer inputsymbol
- the symbol to parse into.reportErrors
- same as ParsingOptions.reportErrors
public static ExpressionSymbol parseInto(ReadTextBuffer buffer, ExpressionSymbol symbol, boolean reportErrors)
Clients may utilize this for rparsing if the contents of the buffer change so long as they track the starting offset of the expression.
buffer
- the ReadTextBuffer inputsymbol
- the symbol to parse into.reportErrors
- same as ParsingOptions.reportErrors
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference 11g Release 1 (11.1.1.1.0) E13403-02 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |