class_body
{ "{"
block_comment "/** Convert the descriptor to its protocol message represent"...
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
type_identifier "FileDescriptorProto"
identifier "toProto"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "proto"
; ";"
} "}"
block_comment "/** Get the file name. */"
method_declaration (+24 nodes collapsed)
block_comment "/** Returns this object. */"
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
type_identifier "FileDescriptor"
identifier "getFile"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
this "this"
; ";"
} "}"
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
type_identifier "GenericDescriptor"
identifier "getParent"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
null_literal "null"
; ";"
} "}"
method_declaration
modifiers
public "public"
boolean_type "boolean"
identifier "isPlaceholder"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "placeholder"
; ";"
} "}"
block_comment "/** Returns the same as getName(). */"
method_declaration (+24 nodes collapsed)
block_comment "/**\n * Get the proto package name. This is the package n"...
method_declaration (+21 nodes collapsed)
block_comment "/** Get the {@code FileOptions}, defined in {@code descripto"...
method_declaration (+124 nodes collapsed)
block_comment "/** Get a list of top-level message types declared in this f"...
method_declaration (+34 nodes collapsed)
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getMessageTypeCount"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
identifier "messageTypes"
. "."
identifier "length"
; ";"
} "}"
method_declaration (+23 nodes collapsed)
block_comment "/** Get a list of top-level enum types declared in this file"...
method_declaration (+34 nodes collapsed)
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getEnumTypeCount"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
identifier "enumTypes"
. "."
identifier "length"
; ";"
} "}"
method_declaration (+23 nodes collapsed)
block_comment "/** Get a list of top-level services declared in this file. "...
method_declaration (+34 nodes collapsed)
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getServiceCount"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
identifier "services"
. "."
identifier "length"
; ";"
} "}"
method_declaration (+23 nodes collapsed)
block_comment "/** Get a list of top-level extensions declared in this file"...
method_declaration (+34 nodes collapsed)
method_declaration
modifiers
public "public"
integral_type
int "int"
identifier "getExtensionCount"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
identifier "extensions"
. "."
identifier "length"
; ";"
} "}"
method_declaration (+23 nodes collapsed)
block_comment "/** Get a list of this file's dependencies (imports). */"
method_declaration (+34 nodes collapsed)
block_comment "/** Get a list of this file's public dependencies (public im"...
method_declaration (+34 nodes collapsed)
block_comment "/** Get the edition of the .proto file. */"
method_declaration (+68 nodes collapsed)
method_declaration (+175 nodes collapsed)
block_comment "/**\n * Find a message type in the file by name. Does not"...
method_declaration (+139 nodes collapsed)
block_comment "/**\n * Find an enum type in the file by name. Does not f"...
method_declaration (+139 nodes collapsed)
block_comment "/**\n * Find a service type in the file by name.\n *\n "...
method_declaration (+139 nodes collapsed)
block_comment "/**\n * Find an extension in the file by name. Does not f"...
method_declaration (+137 nodes collapsed)
block_comment "/**\n * Construct a {@code FileDescriptor}.\n *\n *"...
method_declaration (+39 nodes collapsed)
block_comment "/**\n * Construct a {@code FileDescriptor}.\n *\n *"...
method_declaration (+45 nodes collapsed)
method_declaration (+113 nodes collapsed)
method_declaration
modifiers
private "private"
static "static"
array_type
integral_type
byte "byte"
dimensions
[ "["
] "]"
identifier "latin1Cat"
formal_parameters
( "("
formal_parameter
modifiers
final "final"
array_type
type_identifier "String"
dimensions
[ "["
] "]"
identifier "strings"
) ")"
block
{ "{"
line_comment "// Hack: We can't embed a raw byte array inside generated J"...
line_comment "// (at least, not efficiently), but we can embed Strings. "...
line_comment "// protocol compiler embeds the FileDescriptorProto as a g"...
line_comment "// string literal which is passed to this function to cons"...
line_comment "// file's FileDescriptor. The string literal contains onl"...
line_comment "// characters, each one representing a byte of the FileDes"...
line_comment "// serialized form. So, if we convert it to bytes in ISO-"...
line_comment "// should get the original bytes that we want."
line_comment "// Literal strings are limited to 64k, so it may be split in"...
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_access
identifier "strings"
. "."
identifier "length"
== "=="
decimal_integer_literal "1"
) ")"
block
{ "{"
return_statement
return "return"
method_invocation
array_access
identifier "strings"
[ "["
decimal_integer_literal "0"
] "]"
. "."
identifier "getBytes"
argument_list
( "("
field_access
identifier "Internal"
. "."
identifier "ISO_8859_1"
) ")"
; ";"
} "}"
local_variable_declaration
type_identifier "StringBuilder"
variable_declarator
identifier "descriptorData"
= "="
object_creation_expression
new "new"
type_identifier "StringBuilder"
argument_list
( "("
) ")"
; ";"
enhanced_for_statement (+21 nodes collapsed)
return_statement
return "return"
method_invocation
method_invocation
identifier "descriptorData"
. "."
identifier "toString"
argument_list
( "("
) ")"
. "."
identifier "getBytes"
argument_list
( "("
field_access
identifier "Internal"
. "."
identifier "ISO_8859_1"
) ")"
; ";"
} "}"
method_declaration (+218 nodes collapsed)
block_comment "/**\n * This method is for backward compatibility with ge"...
method_declaration (+221 nodes collapsed)
block_comment "/**\n * This method is to be called by generated code onl"...
method_declaration (+164 nodes collapsed)
block_comment "/**\n * This method is to be called by generated code onl"...
method_declaration (+84 nodes collapsed)
block_comment "/**\n * This method is to be called by generated code onl"...
method_declaration (+92 nodes collapsed)
block_comment "/**\n * This class should be used by generated code only."...
interface_declaration (+21 nodes collapsed)
field_declaration
modifiers
private "private"
type_identifier "FileDescriptorProto"
variable_declarator
identifier "proto"
; ";"
field_declaration
modifiers
private "private"
volatile "volatile"
type_identifier "FileOptions"
variable_declarator
identifier "options"
; ";"
field_declaration
modifiers
private "private"
final "final"
array_type
type_identifier "Descriptor"
dimensions
[ "["
] "]"
variable_declarator
identifier "messageTypes"
; ";"
field_declaration
modifiers
private "private"
final "final"
array_type
type_identifier "EnumDescriptor"
dimensions
[ "["
] "]"
variable_declarator
identifier "enumTypes"
; ";"
field_declaration
modifiers
private "private"
final "final"
array_type
type_identifier "ServiceDescriptor"
dimensions
[ "["
] "]"
variable_declarator
identifier "services"
; ";"
field_declaration
modifiers
private "private"
final "final"
array_type
type_identifier "FieldDescriptor"
dimensions
[ "["
] "]"
variable_declarator
identifier "extensions"
; ";"
field_declaration
modifiers
private "private"
final "final"
array_type
type_identifier "FileDescriptor"
dimensions
[ "["
] "]"
variable_declarator
identifier "dependencies"
; ";"
field_declaration
modifiers
private "private"
final "final"
array_type
type_identifier "FileDescriptor"
dimensions
[ "["
] "]"
variable_declarator
identifier "publicDependencies"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "FileDescriptorTables"
variable_declarator
identifier "tables"
; ";"
field_declaration
modifiers
private "private"
final "final"
boolean_type "boolean"
variable_declarator
identifier "placeholder"
; ";"
field_declaration
modifiers
private "private"
volatile "volatile"
boolean_type "boolean"
variable_declarator
identifier "featuresResolved"
; ";"
constructor_declaration (+748 nodes collapsed)
block_comment "/** Create a placeholder FileDescriptor */"
constructor_declaration (+149 nodes collapsed)
block_comment "/** Create a placeholder FileDescriptor for a message Descri"...
constructor_declaration (+91 nodes collapsed)
block_comment "/** Create a placeholder FileDescriptor for an EnumDescripto"...
constructor_declaration (+93 nodes collapsed)
method_declaration (+66 nodes collapsed)
block_comment "/**\n * This method is to be called by generated code onl"...
method_declaration (+162 nodes collapsed)
method_declaration (+180 nodes collapsed)
block_comment "/** Look up and cross-link all field types, etc. */"
method_declaration (+80 nodes collapsed)
block_comment "/**\n * Replace our {@link FileDescriptorProto} with the "...
method_declaration (+291 nodes collapsed)
} "}"