class_body
{ "{"
field_declaration
modifiers
private "private"
static "static"
final "final"
integral_type
long "long"
variable_declarator
identifier "serialVersionUID"
= "="
decimal_integer_literal "1L"
; ";"
enum_declaration
modifiers
private "private"
enum "enum"
identifier "Kind"
enum_body
{ "{"
enum_constant
identifier "ORDINARY"
, ","
enum_constant
identifier "CONSTRUCTOR"
, ","
enum_constant
identifier "INTERFACE"
} "}"
block_comment "/**\n * {@code [[Call]]} property.\n */"
field_declaration
modifiers
private "private"
type_identifier "ArrowType"
variable_declarator
identifier "call"
; ";"
block_comment "/**\n * The {@code prototype} property. This field is lazil"...
field_declaration
modifiers
private "private"
type_identifier "FunctionPrototypeType"
variable_declarator
identifier "prototype"
; ";"
block_comment "/**\n * Whether a function is a constructor, an interface, "...
field_declaration
modifiers
private "private"
final "final"
type_identifier "Kind"
variable_declarator
identifier "kind"
; ";"
block_comment "/**\n * The type of {@code this} in the scope of this funct"...
field_declaration
modifiers
private "private"
type_identifier "ObjectType"
variable_declarator
identifier "typeOfThis"
; ";"
block_comment "/**\n * The function node which this type represents. It ma"...
field_declaration
modifiers
private "private"
type_identifier "Node"
variable_declarator
identifier "source"
; ";"
block_comment "/**\n * The interfaces directly implemented by this functio"...
field_declaration
modifiers
private "private"
generic_type
type_identifier "List"
type_arguments
< "<"
type_identifier "ObjectType"
> ">"
variable_declarator
identifier "implementedInterfaces"
= "="
method_invocation
identifier "ImmutableList"
. "."
identifier "of"
argument_list
( "("
) ")"
; ";"
block_comment "/**\n * The types which are subtypes of this function. It i"...
field_declaration
modifiers
private "private"
generic_type
type_identifier "List"
type_arguments
< "<"
type_identifier "FunctionType"
> ">"
variable_declarator
identifier "subTypes"
; ";"
block_comment "/**\n * The template type name. May be {@code null}.\n */"
field_declaration
modifiers
private "private"
type_identifier "String"
variable_declarator
identifier "templateTypeName"
; ";"
block_comment "/**\n * Creates a function type.\n * @param registry the o"...
constructor_declaration (+55 nodes collapsed)
block_comment "/**\n * Creates a function type.\n * @param registry the o"...
constructor_declaration (+56 nodes collapsed)
block_comment "/**\n * Creates a function type.\n * @param registry the o"...
constructor_declaration (+60 nodes collapsed)
block_comment "/** Creates an instance for a function that might be a const"...
constructor_declaration (+244 nodes collapsed)
block_comment "/** Creates an instance for a function that is an interface."...
constructor_declaration (+128 nodes collapsed)
method_declaration (+31 nodes collapsed)
method_declaration (+24 nodes collapsed)
method_declaration (+24 nodes collapsed)
method_declaration (+24 nodes collapsed)
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
boolean_type "boolean"
identifier "isFunctionType"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
true "true"
; ";"
} "}"
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
boolean_type "boolean"
identifier "canBeCalled"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
true "true"
; ";"
} "}"
method_declaration (+63 nodes collapsed)
block_comment "/** Gets an LP node that contains all params. May be null. *"...
method_declaration (+26 nodes collapsed)
block_comment "/** Gets the minimum number of arguments that this function "...
method_declaration (+89 nodes collapsed)
block_comment "/**\n * Gets the maximum number of arguments that this func"...
method_declaration (+88 nodes collapsed)
method_declaration (+26 nodes collapsed)
block_comment "/**\n * Gets the {@code prototype} property of this functio"...
method_declaration (+46 nodes collapsed)
block_comment "/**\n * Sets the prototype, creating the prototype object f"...
method_declaration (+64 nodes collapsed)
block_comment "/**\n * Sets the prototype.\n * @param prototype the proto"...
method_declaration (+124 nodes collapsed)
block_comment "/**\n * Returns all interfaces implemented by a class or it"...
method_declaration (+63 nodes collapsed)
method_declaration (+118 nodes collapsed)
block_comment "/** Returns interfaces implemented directly by a class or it"...
method_declaration (+75 nodes collapsed)
method_declaration (+59 nodes collapsed)
method_declaration (+41 nodes collapsed)
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
public "public"
boolean_type "boolean"
identifier "hasOwnProperty"
formal_parameters
( "("
formal_parameter
type_identifier "String"
identifier "name"
) ")"
block
{ "{"
return_statement
return "return"
binary_expression
method_invocation
super "super"
. "."
identifier "hasOwnProperty"
argument_list
( "("
identifier "name"
) ")"
|| "||"
method_invocation
string_literal
" "\""
string_fragment "prototype"
" "\""
. "."
identifier "equals"
argument_list
( "("
identifier "name"
) ")"
; ";"
} "}"
method_declaration (+373 nodes collapsed)
method_declaration
modifiers
marker_annotation
@ "@"
identifier "Override"
boolean_type "boolean"
identifier "defineProperty"
formal_parameters
( "("
formal_parameter
type_identifier "String"
identifier "name"
, ","
formal_parameter
type_identifier "JSType"
identifier "type"
, ","
formal_parameter
boolean_type "boolean"
identifier "inferred"
, ","
formal_parameter
boolean_type "boolean"
identifier "inExterns"
) ")"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
method_invocation
string_literal
" "\""
string_fragment "prototype"
" "\""
. "."
identifier "equals"
argument_list
( "("
identifier "name"
) ")"
) ")"
block
{ "{"
local_variable_declaration
type_identifier "ObjectType"
variable_declarator
identifier "objType"
= "="
method_invocation
identifier "type"
. "."
identifier "toObjectType"
argument_list
( "("
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "objType"
!= "!="
null_literal "null"
) ")"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
method_invocation
identifier "objType"
. "."
identifier "equals"
argument_list
( "("
identifier "prototype"
) ")"
) ")"
block
{ "{"
return_statement
return "return"
true "true"
; ";"
} "}"
return_statement (+25 nodes collapsed)
} "}"
else "else"
block
{ "{"
return_statement
return "return"
false "false"
; ";"
} "}"
} "}"
return_statement
return "return"
method_invocation
super "super"
. "."
identifier "defineProperty"
argument_list
( "("
identifier "name"
, ","
identifier "type"
, ","
identifier "inferred"
, ","
identifier "inExterns"
) ")"
; ";"
} "}"
method_declaration (+41 nodes collapsed)
method_declaration (+153 nodes collapsed)
method_declaration (+140 nodes collapsed)
block_comment "/**\n * Given a constructor or an interface type, get its s"...
method_declaration (+75 nodes collapsed)
block_comment "/**\n * Given a constructor or an interface type, find out "...
method_declaration (+175 nodes collapsed)
block_comment "/**\n * Given a constructor or an interface type and a prop"...
method_declaration (+126 nodes collapsed)
block_comment "/**\n * Two function types are equal if their signatures ma"...
method_declaration (+220 nodes collapsed)
method_declaration (+44 nodes collapsed)
method_declaration (+31 nodes collapsed)
block_comment "/**\n * Informally, a function is represented by\n * {@cod"...
method_declaration (+442 nodes collapsed)
block_comment "/** Gets the string representation of a var args param. */"
method_declaration (+100 nodes collapsed)
block_comment "/**\n * A function is a subtype of another if their call me"...
method_declaration (+263 nodes collapsed)
method_declaration (+38 nodes collapsed)
block_comment "/**\n * Gets the type of instance of this function.\n * @t"...
method_declaration (+29 nodes collapsed)
block_comment "/** Sets the instance type. This should only be used for spe"...
method_declaration
void_type "void"
identifier "setInstanceType"
formal_parameters
( "("
formal_parameter
type_identifier "ObjectType"
identifier "instanceType"
) ")"
block
{ "{"
expression_statement
assignment_expression
identifier "typeOfThis"
= "="
identifier "instanceType"
; ";"
} "}"
block_comment "/**\n * Returns whether this function type has an instance "...
method_declaration (+26 nodes collapsed)
block_comment "/**\n * Gets the type of {@code this} in this function.\n "...
method_declaration (+36 nodes collapsed)
block_comment "/**\n * Gets the source node.\n */"
method_declaration
modifiers
public "public"
type_identifier "Node"
identifier "getSource"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "source"
; ";"
} "}"
block_comment "/**\n * Sets the source node.\n */"
method_declaration (+23 nodes collapsed)
block_comment "/** Adds a type to the list of subtypes for this type. */"
method_declaration (+48 nodes collapsed)
block_comment "/**\n * Returns a list of types that are subtypes of this t"...
method_declaration
modifiers
public "public"
generic_type
type_identifier "List"
type_arguments
< "<"
type_identifier "FunctionType"
> ">"
identifier "getSubTypes"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "subTypes"
; ";"
} "}"
method_declaration (+30 nodes collapsed)
block_comment "/**\n * Gets the template type name.\n */"
method_declaration
modifiers
public "public"
type_identifier "String"
identifier "getTemplateTypeName"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
identifier "templateTypeName"
; ";"
} "}"
method_declaration (+270 nodes collapsed)
} "}"