|
ModeShape Distribution 3.3.0.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.modeshape.sequencer.ddl.DdlParsers
@Immutable public class DdlParsers
A set of parsers capable of understanding DDL file content. This class can be used directly to create an AstNode tree
representing nodes and properties for DDL statement components.
You can also provide an input or parent AstNode node as the starting point for your tree.
The parser is based on the SQL-92 and extended by specific dialects. These dialect-specific parsers provide db-specific parsing of db-specific statements of statement extensions, features or properties.
| Field Summary | |
|---|---|
static List<DdlParser> |
BUILTIN_PARSERS
|
| Constructor Summary | |
|---|---|
DdlParsers()
Create an instance that uses all of the built-in parsers. |
|
DdlParsers(List<DdlParser> parsers)
Create an instance that uses the supplied parsers, in order. |
|
| Method Summary | |
|---|---|
AstNode |
parse(String ddl,
String fileName)
Parse the supplied DDL content and return the root node of the AST representation. |
AstNode |
parseUsing(String ddl,
String parserId)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final List<DdlParser> BUILTIN_PARSERS
| Constructor Detail |
|---|
public DdlParsers()
built-in parsers.
public DdlParsers(List<DdlParser> parsers)
parsers - the list of parsers; may be empty or null if the built-in parsers should be used| Method Detail |
|---|
public AstNode parseUsing(String ddl,
String parserId)
throws ParsingException
ddl - the DDL being parsed (cannot be null or empty)parserId - the identifier of the parser to use (can be null or empty if best matched parser should be
used)
AstNode
ParsingException - if there is an error parsing the supplied DDL content
IllegalArgumentException - if a parser with the specified identifier cannot be found
public AstNode parse(String ddl,
String fileName)
throws ParsingException
root node of the AST representation.
ddl - content string; may not be nullfileName - the approximate name of the file containing the DDL content; may be null if this is not known
AstNode
ParsingException - if there is an error parsing the supplied DDL content
|
ModeShape Distribution 3.3.0.Final | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||