class_body
{ "{"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
long "long"
variable_declarator
identifier "serialVersionUID"
= "="
decimal_integer_literal "1L"
; ";"
field_declaration (+27 nodes collapsed)
block_comment "/**\n * For testing. Allows a test to disable the optimizat"...
field_declaration
modifiers
protected "protected"
static "static"
boolean_type "boolean"
variable_declarator
identifier "alwaysUseFieldBuilders"
= "="
false "false"
; ";"
block_comment "/**\n * For use by generated code only.\n *\n * <p>TODO: "...
field_declaration
modifiers
protected "protected"
type_identifier "UnknownFieldSet"
variable_declarator
identifier "unknownFields"
; ";"
constructor_declaration (+22 nodes collapsed)
constructor_declaration (+31 nodes collapsed)
block_comment "/** TODO: Remove this unnecessary intermediate implementatio"...
method_declaration (+35 nodes collapsed)
block_comment "/**\n * TODO: Stop using SingleFieldBuilder and remove this"...
method_declaration
modifiers
static "static"
void_type "void"
identifier "enableAlwaysUseFieldBuildersForTesting"
formal_parameters
( "("
) ")"
block
{ "{"
expression_statement
method_invocation
identifier "setAlwaysUseFieldBuildersForTesting"
argument_list
( "("
true "true"
) ")"
; ";"
} "}"
block_comment "/**\n * For testing. Allows a test to disable/re-enable the"...
method_declaration
modifiers
static "static"
void_type "void"
identifier "setAlwaysUseFieldBuildersForTesting"
formal_parameters
( "("
formal_parameter
boolean_type "boolean"
identifier "useBuilders"
) ")"
block
{ "{"
expression_statement
assignment_expression
identifier "alwaysUseFieldBuilders"
= "="
identifier "useBuilders"
; ";"
} "}"
block_comment "/**\n * Get the FieldAccessorTable for this type. We can't "...
method_declaration
modifiers
protected "protected"
abstract "abstract"
type_identifier "FieldAccessorTable"
identifier "internalGetFieldAccessorTable"
formal_parameters
( "("
) ")"
; ";"
line_comment "// TODO: Remove this in a future breaking change for compati"...
line_comment "// code in OSS. Try removing in google3 earlier once old gen"...
method_declaration (+25 nodes collapsed)
block_comment "/**\n * Internal helper to return a modifiable map containi"...
method_declaration (+381 nodes collapsed)
line_comment "// TODO: compute this at {@code build()} time in the Builder"...
method_declaration (+234 nodes collapsed)
method_declaration (+38 nodes collapsed)
block_comment "/**\n * Returns a collection of all the fields in this mess"...
method_declaration (+33 nodes collapsed)
method_declaration (+41 nodes collapsed)
method_declaration (+41 nodes collapsed)
method_declaration (+41 nodes collapsed)
method_declaration (+41 nodes collapsed)
block_comment "/**\n * Obtains the value of the given field, or the defaul"...
method_declaration (+36 nodes collapsed)
method_declaration (+42 nodes collapsed)
method_declaration (+50 nodes collapsed)
line_comment "// TODO: This method should be final."
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
type_identifier "UnknownFieldSet"
identifier "getUnknownFields"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "unknownFields"
; ";"
} "}"
line_comment "// TODO: This should go away when Schema classes cannot modi"...
line_comment "// GeneratedMessage objects anymore."
method_declaration (+21 nodes collapsed)
block_comment "/**\n * Called by subclasses to parse an unknown field.\n "...
method_declaration (+72 nodes collapsed)
block_comment "/**\n * Delegates to parseUnknownField. This method is obso"...
method_declaration (+48 nodes collapsed)
block_comment "/** Used by generated code. */"
method_declaration (+82 nodes collapsed)
block_comment "/** Used by generated code. */"
method_declaration (+78 nodes collapsed)
block_comment "/** Used by generated code. */"
method_declaration (+82 nodes collapsed)
block_comment "/** Used by generated code. */"
method_declaration (+78 nodes collapsed)
block_comment "/** Used by generated code. */"
method_declaration (+82 nodes collapsed)
block_comment "/** Used by generated code. */"
method_declaration (+78 nodes collapsed)
method_declaration (+22 nodes collapsed)
field_declaration
modifiers
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "PRE22_GENCODE_SILENCE_PROPERTY"
= "="
string_literal
" "\""
string_fragment "com.google.protobuf.use_unsafe_pre22_gencode"
" "\""
; ";"
field_declaration
modifiers
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "PRE22_GENCODE_ERROR_PROPERTY"
= "="
string_literal
" "\""
string_fragment "com.google.protobuf.error_on_unsafe_pre22_gencode"
" "\""
; ";"
field_declaration (+67 nodes collapsed)
field_declaration (+26 nodes collapsed)
method_declaration (+137 nodes collapsed)
block_comment "/**\n * This method only exists as a shim for pre-22 gencod"...
method_declaration (+23 nodes collapsed)
method_declaration (+22 nodes collapsed)
method_declaration (+22 nodes collapsed)
method_declaration (+22 nodes collapsed)
method_declaration (+22 nodes collapsed)
method_declaration (+40 nodes collapsed)
method_declaration (+116 nodes collapsed)
method_declaration (+60 nodes collapsed)
method_declaration (+42 nodes collapsed)
method_declaration (+64 nodes collapsed)
block_comment "/**\n * This class is used to make a generated protected me"...
class_declaration (+35 nodes collapsed)
block_comment "/** Creates a new instance of this message type. Overridden "...
method_declaration (+40 nodes collapsed)
block_comment "/** Builder class for {@link GeneratedMessage}. */"
class_declaration (+2482 nodes collapsed)
line_comment "// ========================================================="...
line_comment "// Extensions-related stuff"
block_comment "/** Extends {@link MessageOrBuilder} with extension-related "...
interface_declaration (+628 nodes collapsed)
block_comment "/**\n * Generated message classes for message types that co"...
class_declaration (+2445 nodes collapsed)
block_comment "/**\n * Generated message builders for message types that c"...
class_declaration (+3440 nodes collapsed)
line_comment "// ---------------------------------------------------------"...
block_comment "/**\n * Gets the descriptor for an extension. The implement"...
interface_declaration
interface "interface"
identifier "ExtensionDescriptorRetriever"
interface_body
{ "{"
method_declaration
type_identifier "FieldDescriptor"
identifier "getDescriptor"
formal_parameters
( "("
) ")"
; ";"
} "}"
block_comment "/** For use by generated code only. */"
method_declaration (+128 nodes collapsed)
block_comment "/** For use by generated code only. */"
method_declaration (+77 nodes collapsed)
class_declaration (+100 nodes collapsed)
block_comment "/**\n * Type used to represent generated extensions. The pr"...
class_declaration (+1223 nodes collapsed)
line_comment "// ========================================================="...
block_comment "/** Calls Class.getMethod and throws a RuntimeException if i"...
method_declaration (+115 nodes collapsed)
block_comment "/** Calls invoke and throws a RuntimeException if it fails. "...
method_declaration (+164 nodes collapsed)
block_comment "/**\n * Gets the map field with the given field number. Thi"...
method_declaration (+34 nodes collapsed)
block_comment "/** TODO: Remove, exists for compatibility with generated co"...
method_declaration (+64 nodes collapsed)
block_comment "/**\n * Users should ignore this class. This class provides"...
line_comment "// TODO: Should be marked final in v5.x.x once GeneratedMess"...
class_declaration (+9368 nodes collapsed)
block_comment "/**\n * Replaces this object in the output stream with a se"...
method_declaration (+27 nodes collapsed)
block_comment "/**\n * Checks that the {@link Extension} is non-Lite and r"...
method_declaration (+101 nodes collapsed)
method_declaration (+67 nodes collapsed)
method_declaration (+75 nodes collapsed)
method_declaration (+64 nodes collapsed)
method_declaration (+79 nodes collapsed)
method_declaration (+68 nodes collapsed)
method_declaration (+236 nodes collapsed)
method_declaration (+234 nodes collapsed)
method_declaration (+214 nodes collapsed)
method_declaration (+136 nodes collapsed)
method_declaration (+115 nodes collapsed)
block_comment "/** Serializes the map using the iteration order. */"
method_declaration
modifiers
private "private"
static "static"
type_parameters
< "<"
type_parameter
type_identifier "K"
, ","
type_parameter
type_identifier "V"
> ">"
void_type "void"
identifier "serializeMapTo"
formal_parameters (+33 nodes collapsed)
throws
throws "throws"
type_identifier "IOException"
block
{ "{"
enhanced_for_statement
for "for"
( "("
generic_type
scoped_type_identifier
type_identifier "Map"
. "."
type_identifier "Entry"
type_arguments
< "<"
type_identifier "K"
, ","
type_identifier "V"
> ">"
identifier "entry"
: ":"
method_invocation
identifier "m"
. "."
identifier "entrySet"
argument_list
( "("
) ")"
) ")"
block
{ "{"
expression_statement
method_invocation
identifier "out"
. "."
identifier "writeMessage"
argument_list
( "("
identifier "fieldNumber"
, ","
method_invocation
method_invocation (+33 nodes collapsed)
. "."
identifier "build"
argument_list
( "("
) ")"
) ")"
; ";"
} "}"
} "}"
} "}"