|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avro.compiler.idl.Idl
public class Idl
Grammar to parse a higher-level language into an Avro Schema. Note: each instance is not thread-safe, but multiple separate instances are safely independent.
Field Summary | |
---|---|
Token |
jj_nt
Next token. |
Token |
token
Current token. |
IdlTokenManager |
token_source
Generated Token Manager. |
Fields inherited from interface org.apache.avro.compiler.idl.IdlConstants |
---|
ARRAY, AT, BOOLEAN, BYTES, CHARACTER_LITERAL, COLON, COMMA, DECIMAL_EXPONENT, DECIMAL_FLOATING_POINT_LITERAL, DECIMAL_LITERAL, DEFAULT, DOC_COMMENT, DOT, DOUBLE, ENUM, EOF, EQUALS, ERROR, FALSE, FIXED, FLOAT, FLOATING_POINT_LITERAL, GT, HEX_LITERAL, HEXADECIMAL_EXPONENT, HEXADECIMAL_FLOATING_POINT_LITERAL, IDENTIFIER, IDL, IMPORT, INT, INTEGER_LITERAL, LBRACE, LBRACK, LETTER, LONG, LPAREN, LT, MAP, MULTI_LINE_COMMENT, NULL, OCTAL_LITERAL, ONEWAY, PART_LETTER, PROTOCOL, RBRACE, RBRACK, RECORD, RPAREN, SCHEMA, SEMICOLON, SINGLE_LINE_COMMENT, STRING, STRING_LITERAL, STUFF_TO_IGNORE, THROWS, TICK, tokenImage, TRUE, UNION, VOID |
Constructor Summary | |
---|---|
Idl(File inputFile)
|
|
Idl(IdlTokenManager tm)
Constructor with generated Token Manager. |
|
Idl(InputStream stream)
Constructor with InputStream. |
|
Idl(InputStream stream,
String encoding)
Constructor with InputStream and supplied encoding |
|
Idl(Reader stream)
Constructor. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public IdlTokenManager token_source
public Token token
public Token jj_nt
Constructor Detail |
---|
public Idl(File inputFile) throws IOException
IOException
public Idl(InputStream stream)
public Idl(InputStream stream, String encoding)
public Idl(Reader stream)
public Idl(IdlTokenManager tm)
Method Detail |
---|
public final Protocol CompilationUnit() throws ParseException
ParseException
public final Schema NamedSchemaDeclaration() throws ParseException
ParseException
public final Schema UnionDefinition() throws ParseException
ParseException
public final Protocol ProtocolDeclaration() throws ParseException
ParseException
public final Schema EnumDeclaration() throws ParseException
ParseException
public final List<String> EnumBody() throws ParseException
ParseException
public final void EnumConstant(List<String> symbols) throws ParseException
ParseException
public final void ProtocolBody(Protocol p) throws ParseException
ParseException
public final Protocol ImportIdl() throws ParseException
ParseException
public final Protocol ImportProtocol() throws ParseException
ParseException
public final Schema ImportSchema() throws ParseException
ParseException
public final Schema FixedDeclaration() throws ParseException
ParseException
public final Schema RecordDeclaration() throws ParseException
ParseException
public final void SchemaProperty(Map<String,JsonNode> properties) throws ParseException
ParseException
public final void FieldDeclaration(List<Schema.Field> fields) throws ParseException
ParseException
public final void VariableDeclarator(Schema type, List<Schema.Field> fields) throws ParseException
ParseException
public final Protocol.Message MessageDeclaration(Protocol p) throws ParseException
ParseException
public final void ErrorList(List<Schema> errors) throws ParseException
ParseException
public final Schema FormalParameters() throws ParseException
ParseException
public final void FormalParameter(List<Schema.Field> fields) throws ParseException
ParseException
public final Schema Type() throws ParseException
ParseException
public final Schema ArrayType() throws ParseException
ParseException
public final Schema MapType() throws ParseException
ParseException
public final Schema ReferenceType() throws ParseException
ParseException
public final Schema PrimitiveType() throws ParseException
ParseException
public final Schema ResultType() throws ParseException
ParseException
public final String Identifier() throws ParseException
ParseException
public final Token AnyIdentifier() throws ParseException
ParseException
public final JsonNode Json() throws ParseException
ParseException
public final String JsonString() throws ParseException
ParseException
public final JsonNode JsonObject() throws ParseException
ParseException
public final void JsonFields(ObjectNode o) throws ParseException
ParseException
public final void JsonPair(ObjectNode o) throws ParseException
ParseException
public final JsonNode JsonArray() throws ParseException
ParseException
public final void JsonElements(ArrayNode a) throws ParseException
ParseException
public void ReInit(InputStream stream)
public void ReInit(InputStream stream, String encoding)
public void ReInit(Reader stream)
public void ReInit(IdlTokenManager tm)
public final Token getNextToken()
public final Token getToken(int index)
public ParseException generateParseException()
public final void enable_tracing()
public final void disable_tracing()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |