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–43 unchanged (43 lines)
44 }
45
46 public Object generateId(Object forPojo) {
47 // 04-Jun-2016, tatu: As per [databind#1255], need to consider possibility of
48 // id being generated for "alwaysAsId", but not being written as POJO; regardless,
49 // need to use existing id if there is one:
50 id = generator.generateId(forPojo);
51 return id;
52 }
53
54 /**
55 * Method called to output Object Id as specified.
56 */
57 public void writeAsField(JsonGenerator gen, SerializerProvider provider,
…lines 58–76 unchanged (19 lines)

After

…lines 1–43 unchanged (43 lines)
44 }
45
46 public Object generateId(Object forPojo) {
47 // 04-Jun-2016, tatu: As per [databind#1255], need to consider possibility of
48 // id being generated for "alwaysAsId", but not being written as POJO; regardless,
49 // need to use existing id if there is one:
50 if (id == null) {
51 id = generator.generateId(forPojo);
52 }
53 return id;
54 }
55
56 /**
57 * Method called to output Object Id as specified.
58 */
…lines 59–78 unchanged (20 lines)

Before

program
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "ser"
. "."
identifier "impl"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "IOException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "annotation"
. "."
identifier "ObjectIdGenerator"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "core"
. "."
identifier "JsonGenerator"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "core"
. "."
identifier "SerializableString"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "SerializerProvider"
; ";"
block_comment "/**\n * Simple value container used to keep track of Object I"...
class_declaration
modifiers
public "public"
final "final"
class "class"
identifier "WritableObjectId"
class_body
{ "{"
field_declaration
modifiers
public "public"
final "final"
generic_type
type_identifier "ObjectIdGenerator"
type_arguments
< "<"
wildcard
? "?"
> ">"
variable_declarator
identifier "generator"
; ";"
field_declaration
modifiers
public "public"
type_identifier "Object"
variable_declarator
identifier "id"
; ";"
block_comment "/**\n * Marker to denote whether Object Id value has been"...
field_declaration
modifiers
protected "protected"
boolean_type "boolean"
variable_declarator
identifier "idWritten"
= "="
false "false"
; ";"
constructor_declaration (+28 nodes collapsed)
method_declaration (+114 nodes collapsed)
method_declaration
modifiers
public "public"
type_identifier "Object"
identifier "generateId"
formal_parameters
( "("
formal_parameter
type_identifier "Object"
identifier "forPojo"
) ")"
block
{ "{"
line_comment "// 04-Jun-2016, tatu: As per [databind#1255], need to consid"...
line_comment "// id being generated for \"alwaysAsId\", but not being wri"...
line_comment "// need to use existing id if there is one:"
expression_statement
assignment_expression
identifier "id"
= "="
method_invocation
identifier "generator"
. "."
identifier "generateId"
argument_list
( "("
identifier "forPojo"
) ")"
; ";"
return_statement
return "return"
identifier "id"
; ";"
} "}"
block_comment "/**\n * Method called to output Object Id as specified.\n "...
method_declaration (+117 nodes collapsed)
} "}"

After

program
package_declaration
package "package"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "ser"
. "."
identifier "impl"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "io"
. "."
identifier "IOException"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "annotation"
. "."
identifier "ObjectIdGenerator"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "core"
. "."
identifier "JsonGenerator"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "core"
. "."
identifier "SerializableString"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
scoped_identifier
identifier "com"
. "."
identifier "fasterxml"
. "."
identifier "jackson"
. "."
identifier "databind"
. "."
identifier "SerializerProvider"
; ";"
block_comment "/**\n * Simple value container used to keep track of Object I"...
class_declaration
modifiers
public "public"
final "final"
class "class"
identifier "WritableObjectId"
class_body
{ "{"
field_declaration
modifiers
public "public"
final "final"
generic_type
type_identifier "ObjectIdGenerator"
type_arguments
< "<"
wildcard
? "?"
> ">"
variable_declarator
identifier "generator"
; ";"
field_declaration
modifiers
public "public"
type_identifier "Object"
variable_declarator
identifier "id"
; ";"
block_comment "/**\n * Marker to denote whether Object Id value has been"...
field_declaration
modifiers
protected "protected"
boolean_type "boolean"
variable_declarator
identifier "idWritten"
= "="
false "false"
; ";"
constructor_declaration (+28 nodes collapsed)
method_declaration (+114 nodes collapsed)
method_declaration
modifiers
public "public"
type_identifier "Object"
identifier "generateId"
formal_parameters
( "("
formal_parameter
type_identifier "Object"
identifier "forPojo"
) ")"
block
{ "{"
line_comment "// 04-Jun-2016, tatu: As per [databind#1255], need to consid"...
line_comment "// id being generated for \"alwaysAsId\", but not being wri"...
line_comment "// need to use existing id if there is one:"
if_statement
if "if"
parenthesized_expression
( "("
binary_expression
identifier "id"
== "=="
null_literal "null"
) ")"
block
{ "{"
expression_statement
assignment_expression
identifier "id"
= "="
method_invocation
identifier "generator"
. "."
identifier "generateId"
argument_list
( "("
identifier "forPojo"
) ")"
; ";"
} "}"
return_statement
return "return"
identifier "id"
; ";"
} "}"
block_comment "/**\n * Method called to output Object Id as specified.\n "...
method_declaration (+117 nodes collapsed)
} "}"