class_body
{ "{"
field_declaration (+27 nodes collapsed)
line_comment "// TODO(user): add a flag to allow enabling of this once app"...
line_comment "// using it."
field_declaration (+31 nodes collapsed)
field_declaration
modifiers
private "private"
final "final"
boolean_type "boolean"
variable_declarator
identifier "showInvalidationWarnings"
= "="
false "false"
; ";"
field_declaration
modifiers
private "private"
final "final"
type_identifier "AbstractCompiler"
variable_declarator
identifier "compiler"
; ";"
field_declaration
modifiers
private "private"
final "final"
generic_type
type_identifier "TypeSystem"
type_arguments
< "<"
type_identifier "T"
> ">"
variable_declarator
identifier "typeSystem"
; ";"
class_declaration (+836 nodes collapsed)
field_declaration (+22 nodes collapsed)
method_declaration (+42 nodes collapsed)
method_declaration (+54 nodes collapsed)
block_comment "/**\n * This constructor should only be called by one of th"...
constructor_declaration (+40 nodes collapsed)
method_declaration (+126 nodes collapsed)
block_comment "/**\n * Invalidates the given type, so that no properties o"...
method_declaration (+137 nodes collapsed)
block_comment "/** Returns the property for the given name, creating it if "...
method_declaration (+61 nodes collapsed)
block_comment "/** Public for testing. */"
method_declaration (+29 nodes collapsed)
block_comment "/** Tracks the current type system scope while traversing. *"...
class_declaration (+196 nodes collapsed)
block_comment "/**\n * Finds all properties defined in the externs file an"...
class_declaration (+212 nodes collapsed)
block_comment "/**\n * Traverses the tree, building a map from field names"...
class_declaration (+736 nodes collapsed)
block_comment "/** Renames all properties with references on more than one "...
method_declaration (+338 nodes collapsed)
block_comment "/**\n * Chooses a name to use for renaming in each equivale"...
method_declaration (+242 nodes collapsed)
block_comment "/** Returns a map from field name to types for which it will"...
method_declaration (+194 nodes collapsed)
block_comment "/** Interface for providing the type information needed by t"...
interface_declaration (+197 nodes collapsed)
block_comment "/** Implementation of TypeSystem using JSTypes. */"
class_declaration
modifiers
private "private"
static "static"
class "class"
identifier "JSTypeSystem"
super_interfaces
implements "implements"
type_list
generic_type
type_identifier "TypeSystem"
type_arguments
< "<"
type_identifier "JSType"
> ">"
class_body
{ "{"
field_declaration
modifiers
private "private"
final "final"
generic_type
type_identifier "Set"
type_arguments
< "<"
type_identifier "JSType"
> ">"
variable_declarator
identifier "invalidatingTypes"
; ";"
field_declaration
modifiers
private "private"
type_identifier "JSTypeRegistry"
variable_declarator
identifier "registry"
; ";"
constructor_declaration (+120 nodes collapsed)
method_declaration (+43 nodes collapsed)
method_declaration (+23 nodes collapsed)
method_declaration (+26 nodes collapsed)
method_declaration (+72 nodes collapsed)
method_declaration (+96 nodes collapsed)
method_declaration (+131 nodes collapsed)
method_declaration (+114 nodes collapsed)
method_declaration (+42 nodes collapsed)
method_declaration (+27 nodes collapsed)
method_declaration (+174 nodes collapsed)
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
type_identifier "ObjectType"
identifier "getTypeWithProperty"
formal_parameters
( "("
formal_parameter
type_identifier "String"
identifier "field"
, ","
formal_parameter
type_identifier "JSType"
identifier "type"
) ")"
block
{ "{"
if_statement (+55 nodes collapsed)
line_comment "// Ignore the prototype itself at all times."
if_statement (+23 nodes collapsed)
line_comment "// We look up the prototype chain to find the highest place "...
line_comment "// this appears. This will make references to overriden pro"...
line_comment "// like references to the initial property, so they are rena"...
local_variable_declaration
type_identifier "ObjectType"
variable_declarator
identifier "foundType"
= "="
null_literal "null"
; ";"
local_variable_declaration
type_identifier "ObjectType"
variable_declarator
identifier "objType"
= "="
method_invocation
identifier "ObjectType"
. "."
identifier "cast"
argument_list
( "("
identifier "type"
) ")"
; ";"
while_statement (+58 nodes collapsed)
line_comment "// If the property does not exist on the referenced type but"...
line_comment "// type is an object type, see if any subtype has the proper"...
line_comment "// getGreatestSubtypeWithProperty does not guarantee that th"...
line_comment "// is defined on the returned type, it just indicates that i"...
line_comment "// so we have to double check."
return_statement
return "return"
identifier "foundType"
; ";"
} "}"
method_declaration (+107 nodes collapsed)
method_declaration (+281 nodes collapsed)
} "}"
block_comment "/** Implementation of TypeSystem using concrete types. */"
class_declaration (+1293 nodes collapsed)
} "}"