class_body
{ "{"
block_comment "/** The lower bound. */"
field_declaration
modifiers
private "private"
floating_point_type
double "double"
variable_declarator
identifier "lowerBound"
; ";"
block_comment "/** The upper bound. */"
field_declaration
modifiers
private "private"
floating_point_type
double "double"
variable_declarator
identifier "upperBound"
; ";"
block_comment "/**\r\n * Creates a new <code>GrayPaintScale</code> instan"...
constructor_declaration
modifiers
public "public"
identifier "GrayPaintScale"
formal_parameters
( "("
) ")"
constructor_body
{ "{"
explicit_constructor_invocation
this "this"
argument_list
( "("
decimal_floating_point_literal "0.0"
, ","
decimal_floating_point_literal "1.0"
) ")"
; ";"
} "}"
block_comment "/**\r\n * Creates a new paint scale for values in the spec"...
constructor_declaration (+62 nodes collapsed)
block_comment "/**\r\n * Returns the lower bound.\r\n * \r\n * @retur"...
method_declaration
modifiers
public "public"
floating_point_type
double "double"
identifier "getLowerBound"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
this "this"
. "."
identifier "lowerBound"
; ";"
} "}"
block_comment "/**\r\n * Returns the upper bound.\r\n * \r\n * @retur"...
method_declaration
modifiers
public "public"
floating_point_type
double "double"
identifier "getUpperBound"
formal_parameters
( "("
) ")"
block
{ "{"
return_statement
return "return"
field_access
this "this"
. "."
identifier "upperBound"
; ";"
} "}"
block_comment "/**\r\n * Returns a paint for the specified value.\r\n *"...
method_declaration
modifiers
public "public"
type_identifier "Paint"
identifier "getPaint"
formal_parameters
( "("
formal_parameter
floating_point_type
double "double"
identifier "value"
) ")"
block
{ "{"
local_variable_declaration
floating_point_type
double "double"
variable_declarator
identifier "v"
= "="
method_invocation
identifier "Math"
. "."
identifier "max"
argument_list
( "("
identifier "value"
, ","
field_access
this "this"
. "."
identifier "lowerBound"
) ")"
; ";"
expression_statement
assignment_expression
identifier "v"
= "="
method_invocation
identifier "Math"
. "."
identifier "min"
argument_list
( "("
identifier "v"
, ","
field_access
this "this"
. "."
identifier "upperBound"
) ")"
; ";"
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "g"
= "="
cast_expression
( "("
integral_type
int "int"
) ")"
parenthesized_expression
( "("
binary_expression
binary_expression
parenthesized_expression
( "("
binary_expression
identifier "value"
- "-"
field_access
this "this"
. "."
identifier "lowerBound"
) ")"
/ "/"
parenthesized_expression
( "("
binary_expression
field_access
this "this"
. "."
identifier "upperBound"
- "-"
field_access
this "this"
. "."
identifier "lowerBound"
) ")"
* "*"
decimal_floating_point_literal "255.0"
) ")"
; ";"
return_statement
return "return"
object_creation_expression
new "new"
type_identifier "Color"
argument_list
( "("
identifier "g"
, ","
identifier "g"
, ","
identifier "g"
) ")"
; ";"
} "}"
block_comment "/**\r\n * Tests this <code>GrayPaintScale</code> instance "...
method_declaration (+110 nodes collapsed)
block_comment "/**\r\n * Returns a clone of this <code>GrayPaintScale</co"...
method_declaration (+24 nodes collapsed)
} "}"