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–96 unchanged (96 lines)
97 else if (PatternOptionBuilder.URL_VALUE == clazz)
98 {
99 return (T) createURL(str);
100 }
101 else
102 {
103 return null;
104 }
105 }
106
107 /**
108 * Create an Object from the classname and empty constructor.
109 *
…lines 110–262 unchanged (153 lines)

After

…lines 1–96 unchanged (96 lines)
97 else if (PatternOptionBuilder.URL_VALUE == clazz)
98 {
99 return (T) createURL(str);
100 }
101 else
102 {
103 throw new ParseException("Unable to handle the class: " + clazz);
104 }
105 }
106
107 /**
108 * Create an Object from the classname and empty constructor.
109 *
…lines 110–262 unchanged (153 lines)

Before

program
block_comment "/**\n * Licensed to the Apache Software Foundation (ASF) unde"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "cli"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "File"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "FileInputStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "FileNotFoundException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "net"
. "."
identifier "MalformedURLException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "net"
. "."
identifier "URL"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Date"
; ";"
block_comment "/**\n * This is a temporary implementation. TypeHandler will "...
class_declaration
modifiers
public "public"
class "class"
identifier "TypeHandler"
class_body
{ "{"
block_comment "/**\n * Returns the <code>Object</code> of type <code>obj"...
method_declaration (+47 nodes collapsed)
block_comment "/**\n * Returns the <code>Object</code> of type <code>cla"...
method_declaration
modifiers
annotation
@ "@"
identifier "SuppressWarnings"
annotation_argument_list
( "("
string_literal
" "\""
string_fragment "unchecked"
" "\""
) ")"
line_comment "// returned value will have type T because it is fixed by cl"...
public "public"
static "static"
type_parameters
< "<"
type_parameter
type_identifier "T"
> ">"
type_identifier "T"
identifier "createValue"
formal_parameters
( "("
formal_parameter
modifiers
final "final"
type_identifier "String"
identifier "str"
, ","
formal_parameter
modifiers
final "final"
generic_type
type_identifier "Class"
type_arguments
< "<"
type_identifier "T"
> ">"
identifier "clazz"
) ")"
throws
throws "throws"
type_identifier "ParseException"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_access
identifier "PatternOptionBuilder"
. "."
identifier "STRING_VALUE"
== "=="
identifier "clazz"
) ")"
block
{ "{"
return_statement
return "return"
cast_expression
( "("
type_identifier "T"
) ")"
identifier "str"
; ";"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_access
identifier "PatternOptionBuilder"
. "."
identifier "OBJECT_VALUE"
== "=="
identifier "clazz"
) ")"
block
{ "{"
return_statement
return "return"
cast_expression
( "("
type_identifier "T"
) ")"
method_invocation
identifier "createObject"
argument_list
( "("
identifier "str"
) ")"
; ";"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_access
identifier "PatternOptionBuilder"
. "."
identifier "NUMBER_VALUE"
== "=="
identifier "clazz"
) ")"
block
{ "{"
return_statement
return "return"
cast_expression
( "("
type_identifier "T"
) ")"
method_invocation
identifier "createNumber"
argument_list
( "("
identifier "str"
) ")"
; ";"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_access
identifier "PatternOptionBuilder"
. "."
identifier "DATE_VALUE"
== "=="
identifier "clazz"
) ")"
block
{ "{"
return_statement
return "return"
cast_expression
( "("
type_identifier "T"
) ")"
method_invocation
identifier "createDate"
argument_list
( "("
identifier "str"
) ")"
; ";"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_access
identifier "PatternOptionBuilder"
. "."
identifier "CLASS_VALUE"
== "=="
identifier "clazz"
) ")"
block
{ "{"
return_statement
return "return"
cast_expression
( "("
type_identifier "T"
) ")"
method_invocation
identifier "createClass"
argument_list
( "("
identifier "str"
) ")"
; ";"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_access
identifier "PatternOptionBuilder"
. "."
identifier "FILE_VALUE"
== "=="
identifier "clazz"
) ")"
block
{ "{"
return_statement
return "return"
cast_expression
( "("
type_identifier "T"
) ")"
method_invocation
identifier "createFile"
argument_list
( "("
identifier "str"
) ")"
; ";"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_access
identifier "PatternOptionBuilder"
. "."
identifier "EXISTING_FILE_VALUE"
== "=="
identifier "clazz"
) ")"
block
{ "{"
return_statement
return "return"
cast_expression
( "("
type_identifier "T"
) ")"
method_invocation
identifier "openFile"
argument_list
( "("
identifier "str"
) ")"
; ";"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_access
identifier "PatternOptionBuilder"
. "."
identifier "FILES_VALUE"
== "=="
identifier "clazz"
) ")"
block
{ "{"
return_statement
return "return"
cast_expression
( "("
type_identifier "T"
) ")"
method_invocation
identifier "createFiles"
argument_list
( "("
identifier "str"
) ")"
; ";"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_access
identifier "PatternOptionBuilder"
. "."
identifier "URL_VALUE"
== "=="
identifier "clazz"
) ")"
block
{ "{"
return_statement
return "return"
cast_expression
( "("
type_identifier "T"
) ")"
method_invocation
identifier "createURL"
argument_list
( "("
identifier "str"
) ")"
; ";"
} "}"
else "else"
block
{ "{"
return_statement
return "return"
null_literal "null"
; ";"
} "}"
} "}"
block_comment "/**\n * Create an Object from the classname and empty co"...
method_declaration (+137 nodes collapsed)
block_comment "/**\n * Create a number from a String. If a . is present,"...
method_declaration (+97 nodes collapsed)
block_comment "/**\n * Returns the class whose name is <code>classname</"...
method_declaration (+71 nodes collapsed)
block_comment "/**\n * Returns the date represented by <code>str</code>."...
method_declaration (+30 nodes collapsed)
block_comment "/**\n * Returns the URL represented by <code>str</code>.\n"...
method_declaration (+64 nodes collapsed)
block_comment "/**\n * Returns the File represented by <code>str</code>."...
method_declaration (+27 nodes collapsed)
block_comment "/**\n * Returns the opened FileInputStream represented by"...
method_declaration (+60 nodes collapsed)
block_comment "/**\n * Returns the File[] represented by <code>str</code"...
method_declaration (+36 nodes collapsed)
} "}"

After

program
block_comment "/**\n * Licensed to the Apache Software Foundation (ASF) unde"...
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "apache"
. "."
identifier "commons"
. "."
identifier "cli"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "File"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "FileInputStream"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "FileNotFoundException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "net"
. "."
identifier "MalformedURLException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "net"
. "."
identifier "URL"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Date"
; ";"
block_comment "/**\n * This is a temporary implementation. TypeHandler will "...
class_declaration
modifiers
public "public"
class "class"
identifier "TypeHandler"
class_body
{ "{"
block_comment "/**\n * Returns the <code>Object</code> of type <code>obj"...
method_declaration (+47 nodes collapsed)
block_comment "/**\n * Returns the <code>Object</code> of type <code>cla"...
method_declaration
modifiers
annotation
@ "@"
identifier "SuppressWarnings"
annotation_argument_list
( "("
string_literal
" "\""
string_fragment "unchecked"
" "\""
) ")"
line_comment "// returned value will have type T because it is fixed by cl"...
public "public"
static "static"
type_parameters
< "<"
type_parameter
type_identifier "T"
> ">"
type_identifier "T"
identifier "createValue"
formal_parameters
( "("
formal_parameter
modifiers
final "final"
type_identifier "String"
identifier "str"
, ","
formal_parameter
modifiers
final "final"
generic_type
type_identifier "Class"
type_arguments
< "<"
type_identifier "T"
> ">"
identifier "clazz"
) ")"
throws
throws "throws"
type_identifier "ParseException"
block
{ "{"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_access
identifier "PatternOptionBuilder"
. "."
identifier "STRING_VALUE"
== "=="
identifier "clazz"
) ")"
block
{ "{"
return_statement
return "return"
cast_expression
( "("
type_identifier "T"
) ")"
identifier "str"
; ";"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_access
identifier "PatternOptionBuilder"
. "."
identifier "OBJECT_VALUE"
== "=="
identifier "clazz"
) ")"
block
{ "{"
return_statement
return "return"
cast_expression
( "("
type_identifier "T"
) ")"
method_invocation
identifier "createObject"
argument_list
( "("
identifier "str"
) ")"
; ";"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_access
identifier "PatternOptionBuilder"
. "."
identifier "NUMBER_VALUE"
== "=="
identifier "clazz"
) ")"
block
{ "{"
return_statement
return "return"
cast_expression
( "("
type_identifier "T"
) ")"
method_invocation
identifier "createNumber"
argument_list
( "("
identifier "str"
) ")"
; ";"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_access
identifier "PatternOptionBuilder"
. "."
identifier "DATE_VALUE"
== "=="
identifier "clazz"
) ")"
block
{ "{"
return_statement
return "return"
cast_expression
( "("
type_identifier "T"
) ")"
method_invocation
identifier "createDate"
argument_list
( "("
identifier "str"
) ")"
; ";"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_access
identifier "PatternOptionBuilder"
. "."
identifier "CLASS_VALUE"
== "=="
identifier "clazz"
) ")"
block
{ "{"
return_statement
return "return"
cast_expression
( "("
type_identifier "T"
) ")"
method_invocation
identifier "createClass"
argument_list
( "("
identifier "str"
) ")"
; ";"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_access
identifier "PatternOptionBuilder"
. "."
identifier "FILE_VALUE"
== "=="
identifier "clazz"
) ")"
block
{ "{"
return_statement
return "return"
cast_expression
( "("
type_identifier "T"
) ")"
method_invocation
identifier "createFile"
argument_list
( "("
identifier "str"
) ")"
; ";"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_access
identifier "PatternOptionBuilder"
. "."
identifier "EXISTING_FILE_VALUE"
== "=="
identifier "clazz"
) ")"
block
{ "{"
return_statement
return "return"
cast_expression
( "("
type_identifier "T"
) ")"
method_invocation
identifier "openFile"
argument_list
( "("
identifier "str"
) ")"
; ";"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_access
identifier "PatternOptionBuilder"
. "."
identifier "FILES_VALUE"
== "=="
identifier "clazz"
) ")"
block
{ "{"
return_statement
return "return"
cast_expression
( "("
type_identifier "T"
) ")"
method_invocation
identifier "createFiles"
argument_list
( "("
identifier "str"
) ")"
; ";"
} "}"
else "else"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
field_access
identifier "PatternOptionBuilder"
. "."
identifier "URL_VALUE"
== "=="
identifier "clazz"
) ")"
block
{ "{"
return_statement
return "return"
cast_expression
( "("
type_identifier "T"
) ")"
method_invocation
identifier "createURL"
argument_list
( "("
identifier "str"
) ")"
; ";"
} "}"
else "else"
block
{ "{"
throw_statement
throw "throw"
object_creation_expression
new "new"
type_identifier "ParseException"
argument_list
( "("
binary_expression
string_literal
" "\""
string_fragment "Unable to handle the class: "
" "\""
+ "+"
identifier "clazz"
) ")"
; ";"
} "}"
} "}"
block_comment "/**\n * Create an Object from the classname and empty co"...
method_declaration (+137 nodes collapsed)
block_comment "/**\n * Create a number from a String. If a . is present,"...
method_declaration (+97 nodes collapsed)
block_comment "/**\n * Returns the class whose name is <code>classname</"...
method_declaration (+71 nodes collapsed)
block_comment "/**\n * Returns the date represented by <code>str</code>."...
method_declaration (+30 nodes collapsed)
block_comment "/**\n * Returns the URL represented by <code>str</code>.\n"...
method_declaration (+64 nodes collapsed)
block_comment "/**\n * Returns the File represented by <code>str</code>."...
method_declaration (+27 nodes collapsed)
block_comment "/**\n * Returns the opened FileInputStream represented by"...
method_declaration (+60 nodes collapsed)
block_comment "/**\n * Returns the File[] represented by <code>str</code"...
method_declaration (+36 nodes collapsed)
} "}"