Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–903 unchanged (903 lines)
904 return null;
905 } else if (array.length == 0) {
906 return ArrayUtils.EMPTY_CLASS_ARRAY;
907 }
908 Class<?>[] classes = new Class[array.length];
909 for (int i = 0; i < array.length; i++) {
910 classes[i] = array[i].getClass();
911 }
912 return classes;
913 }
914
915 // Short canonical name
916 // ----------------------------------------------------------------------
…lines 917–1053 unchanged (137 lines)

After

…lines 1–903 unchanged (903 lines)
904 return null;
905 } else if (array.length == 0) {
906 return ArrayUtils.EMPTY_CLASS_ARRAY;
907 }
908 Class<?>[] classes = new Class[array.length];
909 for (int i = 0; i < array.length; i++) {
910 classes[i] = array[i] == null ? null : array[i].getClass();
911 }
912 return classes;
913 }
914
915 // Short canonical name
916 // ----------------------------------------------------------------------
…lines 917–1053 unchanged (137 lines)

Before

program
block_comment "/*\n * Licensed to the Apache Software Foundation (ASF) under"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "lang3"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "lang"
. "."
identifier "reflect"
. "."
identifier "Method"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "lang"
. "."
identifier "reflect"
. "."
identifier "Modifier"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "ArrayList"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "HashMap"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "HashSet"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "LinkedHashSet"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "List"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Map"
; ";"
block_comment "/**\n * <p>Operates on classes without using reflection.</p>\n"...
class_declaration
modifiers
public "public"
class "class"
identifier "ClassUtils"
class_body
{ "{"
block_comment "/**\n * <p>The package separator character: <code>'&#x2e;"...
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
char "char"
variable_declarator
identifier "PACKAGE_SEPARATOR_CHAR"
= "="
character_literal "'.'"
; ";"
block_comment "/**\n * <p>The package separator String: <code>\"&#x2e;\"</"...
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "PACKAGE_SEPARATOR"
= "="
method_invocation
identifier "String"
. "."
identifier "valueOf"
argument_list
( "("
identifier "PACKAGE_SEPARATOR_CHAR"
) ")"
; ";"
block_comment "/**\n * <p>The inner class separator character: <code>'$'"...
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
char "char"
variable_declarator
identifier "INNER_CLASS_SEPARATOR_CHAR"
= "="
character_literal "'$'"
; ";"
block_comment "/**\n * <p>The inner class separator String: <code>\"$\"</c"...
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "INNER_CLASS_SEPARATOR"
= "="
method_invocation
identifier "String"
. "."
identifier "valueOf"
argument_list
( "("
identifier "INNER_CLASS_SEPARATOR_CHAR"
) ")"
; ";"
block_comment "/**\n * Maps primitive <code>Class</code>es to their corr"...
field_declaration (+54 nodes collapsed)
static_initializer (+167 nodes collapsed)
block_comment "/**\n * Maps wrapper <code>Class</code>es to their corres"...
field_declaration (+54 nodes collapsed)
static_initializer (+78 nodes collapsed)
block_comment "/**\n * Maps a primitive class name to its corresponding "...
field_declaration (+30 nodes collapsed)
block_comment "/**\n * Maps an abbreviation used in array class names to"...
field_declaration (+30 nodes collapsed)
block_comment "/**\n * Add primitive type abbreviation to maps of abbrev"...
method_declaration (+43 nodes collapsed)
block_comment "/**\n * Feed abbreviation maps\n */"
static_initializer (+133 nodes collapsed)
block_comment "/**\n * <p>ClassUtils instances should NOT be constructed"...
constructor_declaration
modifiers
public "public"
identifier "ClassUtils"
formal_parameters
( "("
) ")"
constructor_body
{ "{"
explicit_constructor_invocation
super "super"
argument_list
( "("
) ")"
; ";"
} "}"
line_comment "// Short class name"
line_comment "// ---------------------------------------------------------"...
block_comment "/**\n * <p>Gets the class name minus the package name for"...
method_declaration (+50 nodes collapsed)
block_comment "/**\n * <p>Gets the class name minus the package name fro"...
method_declaration (+55 nodes collapsed)
block_comment "/**\n * <p>Gets the class name minus the package name fro"...
method_declaration (+329 nodes collapsed)
line_comment "// Package name"
line_comment "// ---------------------------------------------------------"...
block_comment "/**\n * <p>Gets the package name of an <code>Object</code"...
method_declaration (+50 nodes collapsed)
block_comment "/**\n * <p>Gets the package name of a <code>Class</code>."...
method_declaration (+55 nodes collapsed)
block_comment "/**\n * <p>Gets the package name from a <code>String</cod"...
method_declaration (+183 nodes collapsed)
line_comment "// Superclasses/Superinterfaces"
line_comment "// ---------------------------------------------------------"...
block_comment "/**\n * <p>Gets a <code>List</code> of superclasses for t"...
method_declaration (+139 nodes collapsed)
block_comment "/**\n * <p>Gets a <code>List</code> of all interfaces imp"...
method_declaration (+113 nodes collapsed)
block_comment "/**\n * Get the interfaces for the specified class.\n "...
method_declaration (+126 nodes collapsed)
line_comment "// Convert list"
line_comment "// ---------------------------------------------------------"...
block_comment "/**\n * <p>Given a <code>List</code> of class names, this"...
method_declaration (+146 nodes collapsed)
block_comment "/**\n * <p>Given a <code>List</code> of <code>Class</code"...
method_declaration (+139 nodes collapsed)
line_comment "// Is assignable"
line_comment "// ---------------------------------------------------------"...
block_comment "/**\n * <p>Checks if an array of Classes can be assigned "...
method_declaration (+59 nodes collapsed)
block_comment "/**\n * <p>Checks if an array of Classes can be assigned "...
method_declaration (+173 nodes collapsed)
block_comment "/**\n * <p>Checks if one <code>Class</code> can be assign"...
method_declaration (+51 nodes collapsed)
block_comment "/**\n * <p>Checks if one <code>Class</code> can be assign"...
method_declaration (+681 nodes collapsed)
block_comment "/**\n * <p>Converts the specified primitive Class object "...
method_declaration (+78 nodes collapsed)
block_comment "/**\n * <p>Converts the specified array of primitive Clas"...
method_declaration (+145 nodes collapsed)
block_comment "/**\n * <p>Converts the specified wrapper class to its co"...
method_declaration (+38 nodes collapsed)
block_comment "/**\n * <p>Converts the specified array of wrapper Class "...
method_declaration (+145 nodes collapsed)
line_comment "// Inner class"
line_comment "// ---------------------------------------------------------"...
block_comment "/**\n * <p>Is the specified class an inner class or stati"...
method_declaration (+57 nodes collapsed)
line_comment "// Class loading"
line_comment "// ---------------------------------------------------------"...
block_comment "/**\n * Returns the class represented by <code>className<"...
method_declaration (+132 nodes collapsed)
block_comment "/**\n * Returns the (initialized) class represented by <c"...
method_declaration (+41 nodes collapsed)
block_comment "/**\n * Returns the (initialized) class represented by <c"...
method_declaration (+35 nodes collapsed)
block_comment "/**\n * Returns the class represented by <code>className<"...
method_declaration (+84 nodes collapsed)
line_comment "// Public method"
line_comment "// ---------------------------------------------------------"...
block_comment "/**\n * <p>Returns the desired Method much like <code>Cla"...
method_declaration (+302 nodes collapsed)
line_comment "// ---------------------------------------------------------"...
block_comment "/**\n * Converts a class name to a JLS style class name.\n"...
method_declaration (+227 nodes collapsed)
block_comment "/**\n * <p>Converts an array of <code>Object</code> in to"...
method_declaration
modifiers
public "public"
static "static"
array_type
generic_type
type_identifier "Class"
type_arguments
< "<"
wildcard
? "?"
> ">"
dimensions
[ "["
] "]"
identifier "toClass"
formal_parameters
( "("
formal_parameter
array_type
type_identifier "Object"
dimensions
[ "["
] "]"
identifier "array"
) ")"
block
{ "{"
if_statement (+39 nodes collapsed)
local_variable_declaration (+26 nodes collapsed)
for_statement
for "for"
( "("
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "i"
= "="
decimal_integer_literal "0"
; ";"
binary_expression
identifier "i"
< "<"
field_access
identifier "array"
. "."
identifier "length"
; ";"
update_expression
identifier "i"
++ "++"
) ")"
block
{ "{"
expression_statement
assignment_expression
array_access
identifier "classes"
[ "["
identifier "i"
] "]"
= "="
method_invocation
array_access
identifier "array"
[ "["
identifier "i"
] "]"
. "."
identifier "getClass"
argument_list
( "("
) ")"
; ";"
} "}"
return_statement
return "return"
identifier "classes"
; ";"
} "}"
line_comment "// Short canonical name"
line_comment "// ---------------------------------------------------------"...
block_comment "/**\n * <p>Gets the canonical name minus the package name"...
method_declaration (+56 nodes collapsed)
block_comment "/**\n * <p>Gets the canonical name minus the package name"...
method_declaration (+55 nodes collapsed)
block_comment "/**\n * <p>Gets the canonical name minus the package name"...
method_declaration (+31 nodes collapsed)
line_comment "// Package name"
line_comment "// ---------------------------------------------------------"...
block_comment "/**\n * <p>Gets the package name from the canonical name "...
method_declaration (+56 nodes collapsed)
block_comment "/**\n * <p>Gets the package name from the canonical name "...
method_declaration (+55 nodes collapsed)
block_comment "/**\n * <p>Gets the package name from the canonical name."...
method_declaration (+31 nodes collapsed)
block_comment "/**\n * <p>Converts a given name of class into canonical "...
method_declaration (+280 nodes collapsed)
} "}"

After

program
block_comment "/*\n * Licensed to the Apache Software Foundation (ASF) under"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "lang3"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "lang"
. "."
identifier "reflect"
. "."
identifier "Method"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "lang"
. "."
identifier "reflect"
. "."
identifier "Modifier"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "ArrayList"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "HashMap"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "HashSet"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "LinkedHashSet"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "List"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Map"
; ";"
block_comment "/**\n * <p>Operates on classes without using reflection.</p>\n"...
class_declaration
modifiers
public "public"
class "class"
identifier "ClassUtils"
class_body
{ "{"
block_comment "/**\n * <p>The package separator character: <code>'&#x2e;"...
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
char "char"
variable_declarator
identifier "PACKAGE_SEPARATOR_CHAR"
= "="
character_literal "'.'"
; ";"
block_comment "/**\n * <p>The package separator String: <code>\"&#x2e;\"</"...
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "PACKAGE_SEPARATOR"
= "="
method_invocation
identifier "String"
. "."
identifier "valueOf"
argument_list
( "("
identifier "PACKAGE_SEPARATOR_CHAR"
) ")"
; ";"
block_comment "/**\n * <p>The inner class separator character: <code>'$'"...
field_declaration
modifiers
public "public"
static "static"
final "final"
integral_type
char "char"
variable_declarator
identifier "INNER_CLASS_SEPARATOR_CHAR"
= "="
character_literal "'$'"
; ";"
block_comment "/**\n * <p>The inner class separator String: <code>\"$\"</c"...
field_declaration
modifiers
public "public"
static "static"
final "final"
type_identifier "String"
variable_declarator
identifier "INNER_CLASS_SEPARATOR"
= "="
method_invocation
identifier "String"
. "."
identifier "valueOf"
argument_list
( "("
identifier "INNER_CLASS_SEPARATOR_CHAR"
) ")"
; ";"
block_comment "/**\n * Maps primitive <code>Class</code>es to their corr"...
field_declaration (+54 nodes collapsed)
static_initializer (+167 nodes collapsed)
block_comment "/**\n * Maps wrapper <code>Class</code>es to their corres"...
field_declaration (+54 nodes collapsed)
static_initializer (+78 nodes collapsed)
block_comment "/**\n * Maps a primitive class name to its corresponding "...
field_declaration (+30 nodes collapsed)
block_comment "/**\n * Maps an abbreviation used in array class names to"...
field_declaration (+30 nodes collapsed)
block_comment "/**\n * Add primitive type abbreviation to maps of abbrev"...
method_declaration (+43 nodes collapsed)
block_comment "/**\n * Feed abbreviation maps\n */"
static_initializer (+133 nodes collapsed)
block_comment "/**\n * <p>ClassUtils instances should NOT be constructed"...
constructor_declaration
modifiers
public "public"
identifier "ClassUtils"
formal_parameters
( "("
) ")"
constructor_body
{ "{"
explicit_constructor_invocation
super "super"
argument_list
( "("
) ")"
; ";"
} "}"
line_comment "// Short class name"
line_comment "// ---------------------------------------------------------"...
block_comment "/**\n * <p>Gets the class name minus the package name for"...
method_declaration (+50 nodes collapsed)
block_comment "/**\n * <p>Gets the class name minus the package name fro"...
method_declaration (+55 nodes collapsed)
block_comment "/**\n * <p>Gets the class name minus the package name fro"...
method_declaration (+329 nodes collapsed)
line_comment "// Package name"
line_comment "// ---------------------------------------------------------"...
block_comment "/**\n * <p>Gets the package name of an <code>Object</code"...
method_declaration (+50 nodes collapsed)
block_comment "/**\n * <p>Gets the package name of a <code>Class</code>."...
method_declaration (+55 nodes collapsed)
block_comment "/**\n * <p>Gets the package name from a <code>String</cod"...
method_declaration (+183 nodes collapsed)
line_comment "// Superclasses/Superinterfaces"
line_comment "// ---------------------------------------------------------"...
block_comment "/**\n * <p>Gets a <code>List</code> of superclasses for t"...
method_declaration (+139 nodes collapsed)
block_comment "/**\n * <p>Gets a <code>List</code> of all interfaces imp"...
method_declaration (+113 nodes collapsed)
block_comment "/**\n * Get the interfaces for the specified class.\n "...
method_declaration (+126 nodes collapsed)
line_comment "// Convert list"
line_comment "// ---------------------------------------------------------"...
block_comment "/**\n * <p>Given a <code>List</code> of class names, this"...
method_declaration (+146 nodes collapsed)
block_comment "/**\n * <p>Given a <code>List</code> of <code>Class</code"...
method_declaration (+139 nodes collapsed)
line_comment "// Is assignable"
line_comment "// ---------------------------------------------------------"...
block_comment "/**\n * <p>Checks if an array of Classes can be assigned "...
method_declaration (+59 nodes collapsed)
block_comment "/**\n * <p>Checks if an array of Classes can be assigned "...
method_declaration (+173 nodes collapsed)
block_comment "/**\n * <p>Checks if one <code>Class</code> can be assign"...
method_declaration (+51 nodes collapsed)
block_comment "/**\n * <p>Checks if one <code>Class</code> can be assign"...
method_declaration (+681 nodes collapsed)
block_comment "/**\n * <p>Converts the specified primitive Class object "...
method_declaration (+78 nodes collapsed)
block_comment "/**\n * <p>Converts the specified array of primitive Clas"...
method_declaration (+145 nodes collapsed)
block_comment "/**\n * <p>Converts the specified wrapper class to its co"...
method_declaration (+38 nodes collapsed)
block_comment "/**\n * <p>Converts the specified array of wrapper Class "...
method_declaration (+145 nodes collapsed)
line_comment "// Inner class"
line_comment "// ---------------------------------------------------------"...
block_comment "/**\n * <p>Is the specified class an inner class or stati"...
method_declaration (+57 nodes collapsed)
line_comment "// Class loading"
line_comment "// ---------------------------------------------------------"...
block_comment "/**\n * Returns the class represented by <code>className<"...
method_declaration (+132 nodes collapsed)
block_comment "/**\n * Returns the (initialized) class represented by <c"...
method_declaration (+41 nodes collapsed)
block_comment "/**\n * Returns the (initialized) class represented by <c"...
method_declaration (+35 nodes collapsed)
block_comment "/**\n * Returns the class represented by <code>className<"...
method_declaration (+84 nodes collapsed)
line_comment "// Public method"
line_comment "// ---------------------------------------------------------"...
block_comment "/**\n * <p>Returns the desired Method much like <code>Cla"...
method_declaration (+302 nodes collapsed)
line_comment "// ---------------------------------------------------------"...
block_comment "/**\n * Converts a class name to a JLS style class name.\n"...
method_declaration (+227 nodes collapsed)
block_comment "/**\n * <p>Converts an array of <code>Object</code> in to"...
method_declaration
modifiers
public "public"
static "static"
array_type
generic_type
type_identifier "Class"
type_arguments
< "<"
wildcard
? "?"
> ">"
dimensions
[ "["
] "]"
identifier "toClass"
formal_parameters
( "("
formal_parameter
array_type
type_identifier "Object"
dimensions
[ "["
] "]"
identifier "array"
) ")"
block
{ "{"
if_statement (+39 nodes collapsed)
local_variable_declaration (+26 nodes collapsed)
for_statement
for "for"
( "("
local_variable_declaration
integral_type
int "int"
variable_declarator
identifier "i"
= "="
decimal_integer_literal "0"
; ";"
binary_expression
identifier "i"
< "<"
field_access
identifier "array"
. "."
identifier "length"
; ";"
update_expression
identifier "i"
++ "++"
) ")"
block
{ "{"
expression_statement
assignment_expression
array_access
identifier "classes"
[ "["
identifier "i"
] "]"
= "="
ternary_expression
binary_expression
array_access
identifier "array"
[ "["
identifier "i"
] "]"
== "=="
null_literal "null"
? "?"
null_literal "null"
: ":"
method_invocation
array_access
identifier "array"
[ "["
identifier "i"
] "]"
. "."
identifier "getClass"
argument_list
( "("
) ")"
; ";"
} "}"
return_statement
return "return"
identifier "classes"
; ";"
} "}"
line_comment "// Short canonical name"
line_comment "// ---------------------------------------------------------"...
block_comment "/**\n * <p>Gets the canonical name minus the package name"...
method_declaration (+56 nodes collapsed)
block_comment "/**\n * <p>Gets the canonical name minus the package name"...
method_declaration (+55 nodes collapsed)
block_comment "/**\n * <p>Gets the canonical name minus the package name"...
method_declaration (+31 nodes collapsed)
line_comment "// Package name"
line_comment "// ---------------------------------------------------------"...
block_comment "/**\n * <p>Gets the package name from the canonical name "...
method_declaration (+56 nodes collapsed)
block_comment "/**\n * <p>Gets the package name from the canonical name "...
method_declaration (+55 nodes collapsed)
block_comment "/**\n * <p>Gets the package name from the canonical name."...
method_declaration (+31 nodes collapsed)
block_comment "/**\n * <p>Converts a given name of class into canonical "...
method_declaration (+280 nodes collapsed)
} "}"