Class ModelMerger

java.lang.Object
org.apache.maven.model.merge.ModelMerger
Direct Known Subclasses:
MavenModelMerger

public class ModelMerger extends Object
This is a hand-crafted prototype of the default model merger that should eventually be generated by Modello by a new Java plugin. Code structure to merge source (read-only) object into the target object is:
  • mergeClassname( Classname target, Classname source, boolean sourceDominant, Map<Object, Object> context ) for each model class
  • mergeClassname_FieldName( Classname target, Classname source, boolean sourceDominant, Map<Object, Object> context ) for each field of each model class
  • Object getClassnameKey( Classname classname ) for each class that is used in a list
Code is written like it could be generated, with default behaviour to be overridden when necessary. This is particularly the case for Object getClassnameKey( Classname classname ) method, which by default return the object itself and is expected to be overridden to calculate better suited key value.
Author:
Benjamin Bentmann