.proto schema declarations.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static enum | |
| pack-priv abstract static class |
| Modifier and Type | Field and Description |
|---|---|
| private final char[] | |
| private final ProtoFile. | |
| private final String | |
| private int | line
The number of newline characters encountered thus far. |
| private int | lineStart
The index of the most recent newline character. |
| private String | packageName
Output package name, or null if none yet encountered. |
| private int | pos
Our cursor within the document. |
| private String | prefix
The current package name + nested type names, separated by dots. |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| private int | |
| private int | |
| private int | |
| private void | |
| public static ProtoFile | |
| public static ProtoFile | |
| public static ProtoFile | |
| public static ProtoFile | |
| public static ProtoFile | |
| private char | |
| private char | |
| private String | |
| private DataType | |
| private Object | |
| private String | |
| private EnumElement | |
| private ExtendElement | |
| private ExtensionsElement | readExtensions(String documentation)
Reads extensions like "extensions 101;" or "extensions 101 to max;". |
| private FieldElement | |
| private int | |
| private ProtoParser. | |
| private List | |
| private Map | readMap(char openBrace, char closeBrace, char keyValueSeparator)
Returns a map of string keys and values. |
| private MessageElement | |
| private String | |
| private char | |
| private OneOfElement | |
| private OptionElement | |
| pack-priv ProtoFile | |
| private String | |
| private RpcElement | |
| private ServiceElement | |
| private String | |
| private String | |
| private void | |
| private String | |
| private RuntimeException |
| data | back to summary |
|---|---|
| private final char[] data | |
| fileBuilder | back to summary |
|---|---|
| private final ProtoFile. | |
| filePath | back to summary |
|---|---|
| private final String filePath | |
| line | back to summary |
|---|---|
| private int line The number of newline characters encountered thus far. | |
| lineStart | back to summary |
|---|---|
| private int lineStart The index of the most recent newline character. | |
| packageName | back to summary |
|---|---|
| private String packageName Output package name, or null if none yet encountered. | |
| pos | back to summary |
|---|---|
| private int pos Our cursor within the document. | |
| prefix | back to summary |
|---|---|
| private String prefix The current package name + nested type names, separated by dots. | |
| ProtoParser | back to summary |
|---|---|
| pack-priv ProtoParser(String filePath, char[] data) | |
| addToList | back to summary |
|---|---|
| private void addToList(List<Object> list, Object value) Adds an object or objects to a List. | |
| column | back to summary |
|---|---|
| private int column() | |
| hexDigit | back to summary |
|---|---|
| private int hexDigit(char c) | |
| line | back to summary |
|---|---|
| private int line() | |
| newline | back to summary |
|---|---|
| private void newline() Call this every time a '\n' is encountered. | |
| parse | back to summary |
|---|---|
| public static ProtoFile parse(String name, Reader reader) throws IOException Parse a named | |
| parse | back to summary |
|---|---|
| public static ProtoFile parse(String name, String data) Parse a named | |
| parseUtf8 | back to summary |
|---|---|
| public static ProtoFile parseUtf8(File file) throws IOException Parse a | |
| parseUtf8 | back to summary |
|---|---|
| public static ProtoFile parseUtf8(Path path) throws IOException Parse a | |
| parseUtf8 | back to summary |
|---|---|
| public static ProtoFile parseUtf8(String name, InputStream is) throws IOException Parse a named | |
| peekChar | back to summary |
|---|---|
| private char peekChar() Peeks a non-whitespace character and returns it. The only difference
between this and | |
| readChar | back to summary |
|---|---|
| private char readChar() Reads a non-whitespace character and returns it. | |
| readComment | back to summary |
|---|---|
| private String readComment() Reads a comment and returns its body. | |
| readDataType | back to summary |
|---|---|
| private DataType readDataType() Reads a scalar, map, or type name. | |
| readDeclaration | back to summary |
|---|---|
| private Object readDeclaration(String documentation, ProtoParser. | |
| readDocumentation | back to summary |
|---|---|
| private String readDocumentation() Like | |
| readEnumElement | back to summary |
|---|---|
| private EnumElement readEnumElement(String documentation) Reads an enumerated type declaration and returns it. | |
| readExtend | back to summary |
|---|---|
| private ExtendElement readExtend(String documentation) Reads an extend declaration. | |
| readExtensions | back to summary |
|---|---|
| private ExtensionsElement readExtensions(String documentation) Reads extensions like "extensions 101;" or "extensions 101 to max;". | |
| readField | back to summary |
|---|---|
| private FieldElement readField(String documentation, FieldElement. Reads an field declaration and returns it. | |
| readInt | back to summary |
|---|---|
| private int readInt() Reads an integer and returns it. | |
| readKindAndValue | back to summary |
|---|---|
| private ProtoParser. Reads a value that can be a map, list, string, number, boolean or enum. | |
| readList | back to summary |
|---|---|
| private List Returns a list of values. This is similar to JSON with '[' and ']' surrounding the list and ',' separating values. | |
| readMap | back to summary |
|---|---|
| private Map Returns a map of string keys and values. This is similar to a JSON object, with '{' and '}' surrounding the map, ':' separating keys from values, and ',' separating entries.
| |
| readMessage | back to summary |
|---|---|
| private MessageElement readMessage(String documentation) Reads a message declaration. | |
| readName | back to summary |
|---|---|
| private String readName() Reads a (paren-wrapped), [square-wrapped] or naked symbol name. | |
| readNumericEscape | back to summary |
|---|---|
| private char readNumericEscape(int radix, int len) | |
| readOneOf | back to summary |
|---|---|
| private OneOfElement readOneOf(String documentation) | |
| readOption | back to summary |
|---|---|
| private OptionElement readOption(char keyValueSeparator) Reads a option containing a name, an '=' or ':', and a value. | |
| readProtoFile | back to summary |
|---|---|
| pack-priv ProtoFile readProtoFile() | |
| readQuotedString | back to summary |
|---|---|
| private String readQuotedString() | |
| readRpc | back to summary |
|---|---|
| private RpcElement readRpc(String documentation) Reads an rpc and returns it. | |
| readService | back to summary |
|---|---|
| private ServiceElement readService(String documentation) Reads a service declaration and returns it. | |
| readString | back to summary |
|---|---|
| private String readString() Reads a quoted or unquoted string and returns it. | |
| readWord | back to summary |
|---|---|
| private String readWord() Reads a non-empty word and returns it. | |
| skipWhitespace | back to summary |
|---|---|
| private void skipWhitespace(boolean skipComments) Skips whitespace characters and optionally comments. When this returns,
either | |
| tryAppendTrailingDocumentation | back to summary |
|---|---|
| private String tryAppendTrailingDocumentation(String documentation) | |
| unexpected | back to summary |
|---|---|
| private RuntimeException unexpected(String message) | |
| Modifier and Type | Field and Description |
|---|---|
| public static final ProtoParser. | |
| public static final ProtoParser. | |
| public static final ProtoParser. | |
| public static final ProtoParser. | |
| public static final ProtoParser. | |
| public static final ProtoParser. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public static ProtoParser. | |
| public static ProtoParser. |
| ENUM | back to summary |
|---|---|
| public static final ProtoParser. | |
| EXTEND | back to summary |
|---|---|
| public static final ProtoParser. | |
| FILE | back to summary |
|---|---|
| public static final ProtoParser. | |
| MESSAGE | back to summary |
|---|---|
| public static final ProtoParser. | |
| RPC | back to summary |
|---|---|
| public static final ProtoParser. | |
| SERVICE | back to summary |
|---|---|
| public static final ProtoParser. | |
| Context | back to summary |
|---|---|
| private Context() | |
| permitsExtensions | back to summary |
|---|---|
| public boolean permitsExtensions() | |
| permitsField | back to summary |
|---|---|
| public boolean permitsField() | |
| permitsImport | back to summary |
|---|---|
| public boolean permitsImport() | |
| permitsOneOf | back to summary |
|---|---|
| public boolean permitsOneOf() | |
| permitsPackage | back to summary |
|---|---|
| public boolean permitsPackage() | |
| permitsRpc | back to summary |
|---|---|
| public boolean permitsRpc() | |
| permitsSyntax | back to summary |
|---|---|
| public boolean permitsSyntax() | |
| valueOf | back to summary |
|---|---|
| public static ProtoParser. | |
| values | back to summary |
|---|---|
| public static ProtoParser. | |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv abstract OptionElement. | |
| pack-priv static ProtoParser. | |
| pack-priv abstract Object |
| OptionKindAndValue | back to summary |
|---|---|
| pack-priv OptionKindAndValue() | |
| kind | back to summary |
|---|---|
| pack-priv abstract OptionElement. | |
| of | back to summary |
|---|---|
| pack-priv static ProtoParser. | |
| value | back to summary |
|---|---|
| pack-priv abstract Object value() | |