private Diff createAndAppendChanges ( GraphPair graphPair , Optional < CommitMetadata > commitMetadata ) { DiffBuilder diff = new DiffBuilder ( javersCoreConfiguration . getPrettyValuePrinter ( ) ) ; //calculate node scope diff for ( NodeChangeAppender appender : nodeChangeAppenders ) { diff . addChanges ( appender . getChangeSet ( graphPair ) , commitMetadata ) ; } //calculate snapshot of NewObjects if ( javersCoreConfiguration . isNewObjectsSnapshot ( ) ) { for ( ObjectNode node : graphPair . getOnlyOnRight ( ) ) { FakeNodePair pair = new FakeNodePair ( node ) ; appendPropertyChanges ( diff , pair , commitMetadata ) ; } } //calculate property-to-property diff for ( NodePair pair : nodeMatcher . match ( graphPair ) ) { appendPropertyChanges ( diff , pair , commitMetadata ) ; } return diff . build ( ) ; }
Graph scope appender