View Javadoc
1   // =================== DO NOT EDIT THIS FILE ====================
2   //  Generated by Modello Velocity from transformer.vm
3   //  template, any modifications will be overwritten.
4   // ==============================================================
5   package org.apache.maven.model.v4;
6   
7   import java.io.ObjectStreamException;
8   import java.util.AbstractList;
9   import java.util.ArrayList;
10  import java.util.Collection;
11  import java.util.HashMap;
12  import java.util.Iterator;
13  import java.util.LinkedHashMap;
14  import java.util.List;
15  import java.util.Map;
16  import java.util.Properties;
17  import java.util.Objects;
18  import java.util.function.BinaryOperator;
19  import java.util.function.Function;
20  import java.util.function.Supplier;
21  import java.util.stream.Collectors;
22  
23  import org.apache.maven.api.annotations.Generated;
24  import org.apache.maven.api.xml.XmlNode;
25  import org.apache.maven.api.model.Model;
26  import org.apache.maven.api.model.ModelBase;
27  import org.apache.maven.api.model.PluginContainer;
28  import org.apache.maven.api.model.PluginConfiguration;
29  import org.apache.maven.api.model.BuildBase;
30  import org.apache.maven.api.model.Build;
31  import org.apache.maven.api.model.CiManagement;
32  import org.apache.maven.api.model.Notifier;
33  import org.apache.maven.api.model.Contributor;
34  import org.apache.maven.api.model.Dependency;
35  import org.apache.maven.api.model.Developer;
36  import org.apache.maven.api.model.Exclusion;
37  import org.apache.maven.api.model.IssueManagement;
38  import org.apache.maven.api.model.DistributionManagement;
39  import org.apache.maven.api.model.License;
40  import org.apache.maven.api.model.MailingList;
41  import org.apache.maven.api.model.Organization;
42  import org.apache.maven.api.model.PatternSet;
43  import org.apache.maven.api.model.Parent;
44  import org.apache.maven.api.model.Scm;
45  import org.apache.maven.api.model.FileSet;
46  import org.apache.maven.api.model.Resource;
47  import org.apache.maven.api.model.RepositoryBase;
48  import org.apache.maven.api.model.Repository;
49  import org.apache.maven.api.model.DeploymentRepository;
50  import org.apache.maven.api.model.RepositoryPolicy;
51  import org.apache.maven.api.model.Site;
52  import org.apache.maven.api.model.ConfigurationContainer;
53  import org.apache.maven.api.model.Plugin;
54  import org.apache.maven.api.model.PluginExecution;
55  import org.apache.maven.api.model.DependencyManagement;
56  import org.apache.maven.api.model.PluginManagement;
57  import org.apache.maven.api.model.Reporting;
58  import org.apache.maven.api.model.Profile;
59  import org.apache.maven.api.model.Activation;
60  import org.apache.maven.api.model.ActivationProperty;
61  import org.apache.maven.api.model.ActivationOS;
62  import org.apache.maven.api.model.ActivationFile;
63  import org.apache.maven.api.model.ReportPlugin;
64  import org.apache.maven.api.model.ReportSet;
65  import org.apache.maven.api.model.Prerequisites;
66  import org.apache.maven.api.model.Relocation;
67  import org.apache.maven.api.model.Extension;
68  import org.apache.maven.api.model.InputLocation;
69  import org.apache.maven.api.model.InputSource;
70  import org.apache.maven.internal.xml.XmlNodeImpl;
71  
72  @Generated
73  public class MavenTransformer {
74  
75      private final Function<String, String> transformer;
76  
77      public MavenTransformer(Function<String, String> transformer) {
78          this.transformer = transformer;
79      }
80  
81      /**
82       * Transforms the given model
83       */
84      public Model visit(Model target) {
85          Objects.requireNonNull(target, "target cannot be null");
86          return transformModel(target);
87      }
88  
89      /**
90       * The transformation function.
91       */
92      protected String transform(String value) {
93          return transformer.apply(value);
94      }
95  
96      protected Model transformModel(Model target) {
97          if (target == null) {
98              return null;
99          }
100         Supplier<Model.Builder> creator = () -> Model.newBuilder(target);
101         Model.Builder builder = null;
102         builder = (Model.Builder) transformModel_ModelVersion(creator, builder, target);
103         builder = (Model.Builder) transformModel_Parent(creator, builder, target);
104         builder = (Model.Builder) transformModel_GroupId(creator, builder, target);
105         builder = (Model.Builder) transformModel_ArtifactId(creator, builder, target);
106         builder = (Model.Builder) transformModel_Version(creator, builder, target);
107         builder = (Model.Builder) transformModel_Packaging(creator, builder, target);
108         builder = (Model.Builder) transformModel_Name(creator, builder, target);
109         builder = (Model.Builder) transformModel_Description(creator, builder, target);
110         builder = (Model.Builder) transformModel_Url(creator, builder, target);
111         builder = (Model.Builder) transformModel_ChildProjectUrlInheritAppendPath(creator, builder, target);
112         builder = (Model.Builder) transformModel_Root(creator, builder, target);
113         builder = (Model.Builder) transformModel_PreserveModelVersion(creator, builder, target);
114         builder = (Model.Builder) transformModel_InceptionYear(creator, builder, target);
115         builder = (Model.Builder) transformModel_Organization(creator, builder, target);
116         builder = (Model.Builder) transformModel_Licenses(creator, builder, target);
117         builder = (Model.Builder) transformModel_Developers(creator, builder, target);
118         builder = (Model.Builder) transformModel_Contributors(creator, builder, target);
119         builder = (Model.Builder) transformModel_MailingLists(creator, builder, target);
120         builder = (Model.Builder) transformModel_Prerequisites(creator, builder, target);
121         builder = (Model.Builder) transformModelBase_Modules(creator, builder, target);
122         builder = (Model.Builder) transformModelBase_Subprojects(creator, builder, target);
123         builder = (Model.Builder) transformModel_Scm(creator, builder, target);
124         builder = (Model.Builder) transformModel_IssueManagement(creator, builder, target);
125         builder = (Model.Builder) transformModel_CiManagement(creator, builder, target);
126         builder = (Model.Builder) transformModelBase_DistributionManagement(creator, builder, target);
127         builder = (Model.Builder) transformModelBase_Properties(creator, builder, target);
128         builder = (Model.Builder) transformModelBase_DependencyManagement(creator, builder, target);
129         builder = (Model.Builder) transformModelBase_Dependencies(creator, builder, target);
130         builder = (Model.Builder) transformModelBase_Repositories(creator, builder, target);
131         builder = (Model.Builder) transformModelBase_PluginRepositories(creator, builder, target);
132         builder = (Model.Builder) transformModel_Build(creator, builder, target);
133         builder = (Model.Builder) transformModelBase_Reporting(creator, builder, target);
134         builder = (Model.Builder) transformModel_Profiles(creator, builder, target);
135         return builder != null ? builder.build() : target;
136     }
137 
138     protected Model.Builder transformModel_ModelVersion(Supplier<? extends Model.Builder> creator, Model.Builder builder, Model target) {
139         String oldVal = target.getModelVersion();
140         String newVal = transform(oldVal);
141         return newVal != oldVal ? (builder != null ? builder : creator.get()).modelVersion(newVal) : builder;
142     }
143     protected Model.Builder transformModel_Parent(Supplier<? extends Model.Builder> creator, Model.Builder builder, Model target) {
144         Parent oldVal = target.getParent();
145         Parent newVal = transformParent(oldVal);
146         return newVal != oldVal ? (builder != null ? builder : creator.get()).parent(newVal) : builder;
147     }
148     protected Model.Builder transformModel_GroupId(Supplier<? extends Model.Builder> creator, Model.Builder builder, Model target) {
149         String oldVal = target.getGroupId();
150         String newVal = transform(oldVal);
151         return newVal != oldVal ? (builder != null ? builder : creator.get()).groupId(newVal) : builder;
152     }
153     protected Model.Builder transformModel_ArtifactId(Supplier<? extends Model.Builder> creator, Model.Builder builder, Model target) {
154         String oldVal = target.getArtifactId();
155         String newVal = transform(oldVal);
156         return newVal != oldVal ? (builder != null ? builder : creator.get()).artifactId(newVal) : builder;
157     }
158     protected Model.Builder transformModel_Version(Supplier<? extends Model.Builder> creator, Model.Builder builder, Model target) {
159         String oldVal = target.getVersion();
160         String newVal = transform(oldVal);
161         return newVal != oldVal ? (builder != null ? builder : creator.get()).version(newVal) : builder;
162     }
163     protected Model.Builder transformModel_Packaging(Supplier<? extends Model.Builder> creator, Model.Builder builder, Model target) {
164         String oldVal = target.getPackaging();
165         String newVal = transform(oldVal);
166         return newVal != oldVal ? (builder != null ? builder : creator.get()).packaging(newVal) : builder;
167     }
168     protected Model.Builder transformModel_Name(Supplier<? extends Model.Builder> creator, Model.Builder builder, Model target) {
169         String oldVal = target.getName();
170         String newVal = transform(oldVal);
171         return newVal != oldVal ? (builder != null ? builder : creator.get()).name(newVal) : builder;
172     }
173     protected Model.Builder transformModel_Description(Supplier<? extends Model.Builder> creator, Model.Builder builder, Model target) {
174         String oldVal = target.getDescription();
175         String newVal = transform(oldVal);
176         return newVal != oldVal ? (builder != null ? builder : creator.get()).description(newVal) : builder;
177     }
178     protected Model.Builder transformModel_Url(Supplier<? extends Model.Builder> creator, Model.Builder builder, Model target) {
179         String oldVal = target.getUrl();
180         String newVal = transform(oldVal);
181         return newVal != oldVal ? (builder != null ? builder : creator.get()).url(newVal) : builder;
182     }
183     protected Model.Builder transformModel_ChildProjectUrlInheritAppendPath(Supplier<? extends Model.Builder> creator, Model.Builder builder, Model target) {
184         String oldVal = target.getChildProjectUrlInheritAppendPath();
185         String newVal = transform(oldVal);
186         return newVal != oldVal ? (builder != null ? builder : creator.get()).childProjectUrlInheritAppendPath(newVal) : builder;
187     }
188     protected Model.Builder transformModel_Root(Supplier<? extends Model.Builder> creator, Model.Builder builder, Model target) {
189         // nothing to do, the transformer only handles strings
190         return builder;
191     }
192     protected Model.Builder transformModel_PreserveModelVersion(Supplier<? extends Model.Builder> creator, Model.Builder builder, Model target) {
193         // nothing to do, the transformer only handles strings
194         return builder;
195     }
196     protected Model.Builder transformModel_InceptionYear(Supplier<? extends Model.Builder> creator, Model.Builder builder, Model target) {
197         String oldVal = target.getInceptionYear();
198         String newVal = transform(oldVal);
199         return newVal != oldVal ? (builder != null ? builder : creator.get()).inceptionYear(newVal) : builder;
200     }
201     protected Model.Builder transformModel_Organization(Supplier<? extends Model.Builder> creator, Model.Builder builder, Model target) {
202         Organization oldVal = target.getOrganization();
203         Organization newVal = transformOrganization(oldVal);
204         return newVal != oldVal ? (builder != null ? builder : creator.get()).organization(newVal) : builder;
205     }
206     protected Model.Builder transformModel_Licenses(Supplier<? extends Model.Builder> creator, Model.Builder builder, Model target) {
207         List<License> oldVal = target.getLicenses();
208         List<License> newVal = transform(oldVal, this::transformLicense);
209         return newVal != oldVal ? (builder != null ? builder : creator.get()).licenses(newVal) : builder;
210     }
211     protected Model.Builder transformModel_Developers(Supplier<? extends Model.Builder> creator, Model.Builder builder, Model target) {
212         List<Developer> oldVal = target.getDevelopers();
213         List<Developer> newVal = transform(oldVal, this::transformDeveloper);
214         return newVal != oldVal ? (builder != null ? builder : creator.get()).developers(newVal) : builder;
215     }
216     protected Model.Builder transformModel_Contributors(Supplier<? extends Model.Builder> creator, Model.Builder builder, Model target) {
217         List<Contributor> oldVal = target.getContributors();
218         List<Contributor> newVal = transform(oldVal, this::transformContributor);
219         return newVal != oldVal ? (builder != null ? builder : creator.get()).contributors(newVal) : builder;
220     }
221     protected Model.Builder transformModel_MailingLists(Supplier<? extends Model.Builder> creator, Model.Builder builder, Model target) {
222         List<MailingList> oldVal = target.getMailingLists();
223         List<MailingList> newVal = transform(oldVal, this::transformMailingList);
224         return newVal != oldVal ? (builder != null ? builder : creator.get()).mailingLists(newVal) : builder;
225     }
226     protected Model.Builder transformModel_Prerequisites(Supplier<? extends Model.Builder> creator, Model.Builder builder, Model target) {
227         Prerequisites oldVal = target.getPrerequisites();
228         Prerequisites newVal = transformPrerequisites(oldVal);
229         return newVal != oldVal ? (builder != null ? builder : creator.get()).prerequisites(newVal) : builder;
230     }
231     protected Model.Builder transformModel_Modules(Supplier<? extends Model.Builder> creator, Model.Builder builder, Model target) {
232         List<String> oldVal = target.getModules();
233         List<String> newVal = transform(oldVal, this::transform);
234         return newVal != oldVal ? (builder != null ? builder : creator.get()).modules(newVal) : builder;
235     }
236     protected Model.Builder transformModel_Subprojects(Supplier<? extends Model.Builder> creator, Model.Builder builder, Model target) {
237         List<String> oldVal = target.getSubprojects();
238         List<String> newVal = transform(oldVal, this::transform);
239         return newVal != oldVal ? (builder != null ? builder : creator.get()).subprojects(newVal) : builder;
240     }
241     protected Model.Builder transformModel_Scm(Supplier<? extends Model.Builder> creator, Model.Builder builder, Model target) {
242         Scm oldVal = target.getScm();
243         Scm newVal = transformScm(oldVal);
244         return newVal != oldVal ? (builder != null ? builder : creator.get()).scm(newVal) : builder;
245     }
246     protected Model.Builder transformModel_IssueManagement(Supplier<? extends Model.Builder> creator, Model.Builder builder, Model target) {
247         IssueManagement oldVal = target.getIssueManagement();
248         IssueManagement newVal = transformIssueManagement(oldVal);
249         return newVal != oldVal ? (builder != null ? builder : creator.get()).issueManagement(newVal) : builder;
250     }
251     protected Model.Builder transformModel_CiManagement(Supplier<? extends Model.Builder> creator, Model.Builder builder, Model target) {
252         CiManagement oldVal = target.getCiManagement();
253         CiManagement newVal = transformCiManagement(oldVal);
254         return newVal != oldVal ? (builder != null ? builder : creator.get()).ciManagement(newVal) : builder;
255     }
256     protected Model.Builder transformModel_DistributionManagement(Supplier<? extends Model.Builder> creator, Model.Builder builder, Model target) {
257         DistributionManagement oldVal = target.getDistributionManagement();
258         DistributionManagement newVal = transformDistributionManagement(oldVal);
259         return newVal != oldVal ? (builder != null ? builder : creator.get()).distributionManagement(newVal) : builder;
260     }
261     protected Model.Builder transformModel_Properties(Supplier<? extends Model.Builder> creator, Model.Builder builder, Model target) {
262         Map<String, String> props = target.getProperties();
263         Map<String, String> newProps = null;
264         for (Map.Entry<String, String> entry : props.entrySet()) {
265             String newVal = transform(entry.getValue());
266             if (newVal != null && newVal != entry.getValue()) {
267                 if (newProps == null) {
268                     newProps = new HashMap<>();
269                     newProps.putAll(props);
270                     builder = builder != null ? builder : creator.get();
271                     builder.properties(newProps);
272                 }
273                 newProps.put(entry.getKey(), newVal);
274             }
275         }
276         return builder;
277     }
278     protected Model.Builder transformModel_DependencyManagement(Supplier<? extends Model.Builder> creator, Model.Builder builder, Model target) {
279         DependencyManagement oldVal = target.getDependencyManagement();
280         DependencyManagement newVal = transformDependencyManagement(oldVal);
281         return newVal != oldVal ? (builder != null ? builder : creator.get()).dependencyManagement(newVal) : builder;
282     }
283     protected Model.Builder transformModel_Dependencies(Supplier<? extends Model.Builder> creator, Model.Builder builder, Model target) {
284         List<Dependency> oldVal = target.getDependencies();
285         List<Dependency> newVal = transform(oldVal, this::transformDependency);
286         return newVal != oldVal ? (builder != null ? builder : creator.get()).dependencies(newVal) : builder;
287     }
288     protected Model.Builder transformModel_Repositories(Supplier<? extends Model.Builder> creator, Model.Builder builder, Model target) {
289         List<Repository> oldVal = target.getRepositories();
290         List<Repository> newVal = transform(oldVal, this::transformRepository);
291         return newVal != oldVal ? (builder != null ? builder : creator.get()).repositories(newVal) : builder;
292     }
293     protected Model.Builder transformModel_PluginRepositories(Supplier<? extends Model.Builder> creator, Model.Builder builder, Model target) {
294         List<Repository> oldVal = target.getPluginRepositories();
295         List<Repository> newVal = transform(oldVal, this::transformRepository);
296         return newVal != oldVal ? (builder != null ? builder : creator.get()).pluginRepositories(newVal) : builder;
297     }
298     protected Model.Builder transformModel_Build(Supplier<? extends Model.Builder> creator, Model.Builder builder, Model target) {
299         Build oldVal = target.getBuild();
300         Build newVal = transformBuild(oldVal);
301         return newVal != oldVal ? (builder != null ? builder : creator.get()).build(newVal) : builder;
302     }
303     protected Model.Builder transformModel_Reporting(Supplier<? extends Model.Builder> creator, Model.Builder builder, Model target) {
304         Reporting oldVal = target.getReporting();
305         Reporting newVal = transformReporting(oldVal);
306         return newVal != oldVal ? (builder != null ? builder : creator.get()).reporting(newVal) : builder;
307     }
308     protected Model.Builder transformModel_Profiles(Supplier<? extends Model.Builder> creator, Model.Builder builder, Model target) {
309         List<Profile> oldVal = target.getProfiles();
310         List<Profile> newVal = transform(oldVal, this::transformProfile);
311         return newVal != oldVal ? (builder != null ? builder : creator.get()).profiles(newVal) : builder;
312     }
313 
314     protected ModelBase transformModelBase(ModelBase target) {
315         if (target == null) {
316             return null;
317         }
318         Supplier<ModelBase.Builder> creator = () -> ModelBase.newBuilder(target);
319         ModelBase.Builder builder = null;
320         builder = (ModelBase.Builder) transformModelBase_Modules(creator, builder, target);
321         builder = (ModelBase.Builder) transformModelBase_Subprojects(creator, builder, target);
322         builder = (ModelBase.Builder) transformModelBase_DistributionManagement(creator, builder, target);
323         builder = (ModelBase.Builder) transformModelBase_Properties(creator, builder, target);
324         builder = (ModelBase.Builder) transformModelBase_DependencyManagement(creator, builder, target);
325         builder = (ModelBase.Builder) transformModelBase_Dependencies(creator, builder, target);
326         builder = (ModelBase.Builder) transformModelBase_Repositories(creator, builder, target);
327         builder = (ModelBase.Builder) transformModelBase_PluginRepositories(creator, builder, target);
328         builder = (ModelBase.Builder) transformModelBase_Reporting(creator, builder, target);
329         return builder != null ? builder.build() : target;
330     }
331 
332     protected ModelBase.Builder transformModelBase_Modules(Supplier<? extends ModelBase.Builder> creator, ModelBase.Builder builder, ModelBase target) {
333         List<String> oldVal = target.getModules();
334         List<String> newVal = transform(oldVal, this::transform);
335         return newVal != oldVal ? (builder != null ? builder : creator.get()).modules(newVal) : builder;
336     }
337     protected ModelBase.Builder transformModelBase_Subprojects(Supplier<? extends ModelBase.Builder> creator, ModelBase.Builder builder, ModelBase target) {
338         List<String> oldVal = target.getSubprojects();
339         List<String> newVal = transform(oldVal, this::transform);
340         return newVal != oldVal ? (builder != null ? builder : creator.get()).subprojects(newVal) : builder;
341     }
342     protected ModelBase.Builder transformModelBase_DistributionManagement(Supplier<? extends ModelBase.Builder> creator, ModelBase.Builder builder, ModelBase target) {
343         DistributionManagement oldVal = target.getDistributionManagement();
344         DistributionManagement newVal = transformDistributionManagement(oldVal);
345         return newVal != oldVal ? (builder != null ? builder : creator.get()).distributionManagement(newVal) : builder;
346     }
347     protected ModelBase.Builder transformModelBase_Properties(Supplier<? extends ModelBase.Builder> creator, ModelBase.Builder builder, ModelBase target) {
348         Map<String, String> props = target.getProperties();
349         Map<String, String> newProps = null;
350         for (Map.Entry<String, String> entry : props.entrySet()) {
351             String newVal = transform(entry.getValue());
352             if (newVal != null && newVal != entry.getValue()) {
353                 if (newProps == null) {
354                     newProps = new HashMap<>();
355                     newProps.putAll(props);
356                     builder = builder != null ? builder : creator.get();
357                     builder.properties(newProps);
358                 }
359                 newProps.put(entry.getKey(), newVal);
360             }
361         }
362         return builder;
363     }
364     protected ModelBase.Builder transformModelBase_DependencyManagement(Supplier<? extends ModelBase.Builder> creator, ModelBase.Builder builder, ModelBase target) {
365         DependencyManagement oldVal = target.getDependencyManagement();
366         DependencyManagement newVal = transformDependencyManagement(oldVal);
367         return newVal != oldVal ? (builder != null ? builder : creator.get()).dependencyManagement(newVal) : builder;
368     }
369     protected ModelBase.Builder transformModelBase_Dependencies(Supplier<? extends ModelBase.Builder> creator, ModelBase.Builder builder, ModelBase target) {
370         List<Dependency> oldVal = target.getDependencies();
371         List<Dependency> newVal = transform(oldVal, this::transformDependency);
372         return newVal != oldVal ? (builder != null ? builder : creator.get()).dependencies(newVal) : builder;
373     }
374     protected ModelBase.Builder transformModelBase_Repositories(Supplier<? extends ModelBase.Builder> creator, ModelBase.Builder builder, ModelBase target) {
375         List<Repository> oldVal = target.getRepositories();
376         List<Repository> newVal = transform(oldVal, this::transformRepository);
377         return newVal != oldVal ? (builder != null ? builder : creator.get()).repositories(newVal) : builder;
378     }
379     protected ModelBase.Builder transformModelBase_PluginRepositories(Supplier<? extends ModelBase.Builder> creator, ModelBase.Builder builder, ModelBase target) {
380         List<Repository> oldVal = target.getPluginRepositories();
381         List<Repository> newVal = transform(oldVal, this::transformRepository);
382         return newVal != oldVal ? (builder != null ? builder : creator.get()).pluginRepositories(newVal) : builder;
383     }
384     protected ModelBase.Builder transformModelBase_Reporting(Supplier<? extends ModelBase.Builder> creator, ModelBase.Builder builder, ModelBase target) {
385         Reporting oldVal = target.getReporting();
386         Reporting newVal = transformReporting(oldVal);
387         return newVal != oldVal ? (builder != null ? builder : creator.get()).reporting(newVal) : builder;
388     }
389 
390     protected PluginContainer transformPluginContainer(PluginContainer target) {
391         if (target == null) {
392             return null;
393         }
394         Supplier<PluginContainer.Builder> creator = () -> PluginContainer.newBuilder(target);
395         PluginContainer.Builder builder = null;
396         builder = (PluginContainer.Builder) transformPluginContainer_Plugins(creator, builder, target);
397         return builder != null ? builder.build() : target;
398     }
399 
400     protected PluginContainer.Builder transformPluginContainer_Plugins(Supplier<? extends PluginContainer.Builder> creator, PluginContainer.Builder builder, PluginContainer target) {
401         List<Plugin> oldVal = target.getPlugins();
402         List<Plugin> newVal = transform(oldVal, this::transformPlugin);
403         return newVal != oldVal ? (builder != null ? builder : creator.get()).plugins(newVal) : builder;
404     }
405 
406     protected PluginConfiguration transformPluginConfiguration(PluginConfiguration target) {
407         if (target == null) {
408             return null;
409         }
410         Supplier<PluginConfiguration.Builder> creator = () -> PluginConfiguration.newBuilder(target);
411         PluginConfiguration.Builder builder = null;
412         builder = (PluginConfiguration.Builder) transformPluginConfiguration_PluginManagement(creator, builder, target);
413         builder = (PluginConfiguration.Builder) transformPluginContainer_Plugins(creator, builder, target);
414         return builder != null ? builder.build() : target;
415     }
416 
417     protected PluginConfiguration.Builder transformPluginConfiguration_PluginManagement(Supplier<? extends PluginConfiguration.Builder> creator, PluginConfiguration.Builder builder, PluginConfiguration target) {
418         PluginManagement oldVal = target.getPluginManagement();
419         PluginManagement newVal = transformPluginManagement(oldVal);
420         return newVal != oldVal ? (builder != null ? builder : creator.get()).pluginManagement(newVal) : builder;
421     }
422     protected PluginConfiguration.Builder transformPluginConfiguration_Plugins(Supplier<? extends PluginConfiguration.Builder> creator, PluginConfiguration.Builder builder, PluginConfiguration target) {
423         List<Plugin> oldVal = target.getPlugins();
424         List<Plugin> newVal = transform(oldVal, this::transformPlugin);
425         return newVal != oldVal ? (builder != null ? builder : creator.get()).plugins(newVal) : builder;
426     }
427 
428     protected BuildBase transformBuildBase(BuildBase target) {
429         if (target == null) {
430             return null;
431         }
432         Supplier<BuildBase.Builder> creator = () -> BuildBase.newBuilder(target);
433         BuildBase.Builder builder = null;
434         builder = (BuildBase.Builder) transformBuildBase_DefaultGoal(creator, builder, target);
435         builder = (BuildBase.Builder) transformBuildBase_Resources(creator, builder, target);
436         builder = (BuildBase.Builder) transformBuildBase_TestResources(creator, builder, target);
437         builder = (BuildBase.Builder) transformBuildBase_Directory(creator, builder, target);
438         builder = (BuildBase.Builder) transformBuildBase_FinalName(creator, builder, target);
439         builder = (BuildBase.Builder) transformBuildBase_Filters(creator, builder, target);
440         builder = (BuildBase.Builder) transformPluginConfiguration_PluginManagement(creator, builder, target);
441         builder = (BuildBase.Builder) transformPluginContainer_Plugins(creator, builder, target);
442         return builder != null ? builder.build() : target;
443     }
444 
445     protected BuildBase.Builder transformBuildBase_DefaultGoal(Supplier<? extends BuildBase.Builder> creator, BuildBase.Builder builder, BuildBase target) {
446         String oldVal = target.getDefaultGoal();
447         String newVal = transform(oldVal);
448         return newVal != oldVal ? (builder != null ? builder : creator.get()).defaultGoal(newVal) : builder;
449     }
450     protected BuildBase.Builder transformBuildBase_Resources(Supplier<? extends BuildBase.Builder> creator, BuildBase.Builder builder, BuildBase target) {
451         List<Resource> oldVal = target.getResources();
452         List<Resource> newVal = transform(oldVal, this::transformResource);
453         return newVal != oldVal ? (builder != null ? builder : creator.get()).resources(newVal) : builder;
454     }
455     protected BuildBase.Builder transformBuildBase_TestResources(Supplier<? extends BuildBase.Builder> creator, BuildBase.Builder builder, BuildBase target) {
456         List<Resource> oldVal = target.getTestResources();
457         List<Resource> newVal = transform(oldVal, this::transformResource);
458         return newVal != oldVal ? (builder != null ? builder : creator.get()).testResources(newVal) : builder;
459     }
460     protected BuildBase.Builder transformBuildBase_Directory(Supplier<? extends BuildBase.Builder> creator, BuildBase.Builder builder, BuildBase target) {
461         String oldVal = target.getDirectory();
462         String newVal = transform(oldVal);
463         return newVal != oldVal ? (builder != null ? builder : creator.get()).directory(newVal) : builder;
464     }
465     protected BuildBase.Builder transformBuildBase_FinalName(Supplier<? extends BuildBase.Builder> creator, BuildBase.Builder builder, BuildBase target) {
466         String oldVal = target.getFinalName();
467         String newVal = transform(oldVal);
468         return newVal != oldVal ? (builder != null ? builder : creator.get()).finalName(newVal) : builder;
469     }
470     protected BuildBase.Builder transformBuildBase_Filters(Supplier<? extends BuildBase.Builder> creator, BuildBase.Builder builder, BuildBase target) {
471         List<String> oldVal = target.getFilters();
472         List<String> newVal = transform(oldVal, this::transform);
473         return newVal != oldVal ? (builder != null ? builder : creator.get()).filters(newVal) : builder;
474     }
475     protected BuildBase.Builder transformBuildBase_PluginManagement(Supplier<? extends BuildBase.Builder> creator, BuildBase.Builder builder, BuildBase target) {
476         PluginManagement oldVal = target.getPluginManagement();
477         PluginManagement newVal = transformPluginManagement(oldVal);
478         return newVal != oldVal ? (builder != null ? builder : creator.get()).pluginManagement(newVal) : builder;
479     }
480     protected BuildBase.Builder transformBuildBase_Plugins(Supplier<? extends BuildBase.Builder> creator, BuildBase.Builder builder, BuildBase target) {
481         List<Plugin> oldVal = target.getPlugins();
482         List<Plugin> newVal = transform(oldVal, this::transformPlugin);
483         return newVal != oldVal ? (builder != null ? builder : creator.get()).plugins(newVal) : builder;
484     }
485 
486     protected Build transformBuild(Build target) {
487         if (target == null) {
488             return null;
489         }
490         Supplier<Build.Builder> creator = () -> Build.newBuilder(target);
491         Build.Builder builder = null;
492         builder = (Build.Builder) transformBuild_SourceDirectory(creator, builder, target);
493         builder = (Build.Builder) transformBuild_ScriptSourceDirectory(creator, builder, target);
494         builder = (Build.Builder) transformBuild_TestSourceDirectory(creator, builder, target);
495         builder = (Build.Builder) transformBuild_OutputDirectory(creator, builder, target);
496         builder = (Build.Builder) transformBuild_TestOutputDirectory(creator, builder, target);
497         builder = (Build.Builder) transformBuild_Extensions(creator, builder, target);
498         builder = (Build.Builder) transformBuildBase_DefaultGoal(creator, builder, target);
499         builder = (Build.Builder) transformBuildBase_Resources(creator, builder, target);
500         builder = (Build.Builder) transformBuildBase_TestResources(creator, builder, target);
501         builder = (Build.Builder) transformBuildBase_Directory(creator, builder, target);
502         builder = (Build.Builder) transformBuildBase_FinalName(creator, builder, target);
503         builder = (Build.Builder) transformBuildBase_Filters(creator, builder, target);
504         builder = (Build.Builder) transformPluginConfiguration_PluginManagement(creator, builder, target);
505         builder = (Build.Builder) transformPluginContainer_Plugins(creator, builder, target);
506         return builder != null ? builder.build() : target;
507     }
508 
509     protected Build.Builder transformBuild_SourceDirectory(Supplier<? extends Build.Builder> creator, Build.Builder builder, Build target) {
510         String oldVal = target.getSourceDirectory();
511         String newVal = transform(oldVal);
512         return newVal != oldVal ? (builder != null ? builder : creator.get()).sourceDirectory(newVal) : builder;
513     }
514     protected Build.Builder transformBuild_ScriptSourceDirectory(Supplier<? extends Build.Builder> creator, Build.Builder builder, Build target) {
515         String oldVal = target.getScriptSourceDirectory();
516         String newVal = transform(oldVal);
517         return newVal != oldVal ? (builder != null ? builder : creator.get()).scriptSourceDirectory(newVal) : builder;
518     }
519     protected Build.Builder transformBuild_TestSourceDirectory(Supplier<? extends Build.Builder> creator, Build.Builder builder, Build target) {
520         String oldVal = target.getTestSourceDirectory();
521         String newVal = transform(oldVal);
522         return newVal != oldVal ? (builder != null ? builder : creator.get()).testSourceDirectory(newVal) : builder;
523     }
524     protected Build.Builder transformBuild_OutputDirectory(Supplier<? extends Build.Builder> creator, Build.Builder builder, Build target) {
525         String oldVal = target.getOutputDirectory();
526         String newVal = transform(oldVal);
527         return newVal != oldVal ? (builder != null ? builder : creator.get()).outputDirectory(newVal) : builder;
528     }
529     protected Build.Builder transformBuild_TestOutputDirectory(Supplier<? extends Build.Builder> creator, Build.Builder builder, Build target) {
530         String oldVal = target.getTestOutputDirectory();
531         String newVal = transform(oldVal);
532         return newVal != oldVal ? (builder != null ? builder : creator.get()).testOutputDirectory(newVal) : builder;
533     }
534     protected Build.Builder transformBuild_Extensions(Supplier<? extends Build.Builder> creator, Build.Builder builder, Build target) {
535         List<Extension> oldVal = target.getExtensions();
536         List<Extension> newVal = transform(oldVal, this::transformExtension);
537         return newVal != oldVal ? (builder != null ? builder : creator.get()).extensions(newVal) : builder;
538     }
539     protected Build.Builder transformBuild_DefaultGoal(Supplier<? extends Build.Builder> creator, Build.Builder builder, Build target) {
540         String oldVal = target.getDefaultGoal();
541         String newVal = transform(oldVal);
542         return newVal != oldVal ? (builder != null ? builder : creator.get()).defaultGoal(newVal) : builder;
543     }
544     protected Build.Builder transformBuild_Resources(Supplier<? extends Build.Builder> creator, Build.Builder builder, Build target) {
545         List<Resource> oldVal = target.getResources();
546         List<Resource> newVal = transform(oldVal, this::transformResource);
547         return newVal != oldVal ? (builder != null ? builder : creator.get()).resources(newVal) : builder;
548     }
549     protected Build.Builder transformBuild_TestResources(Supplier<? extends Build.Builder> creator, Build.Builder builder, Build target) {
550         List<Resource> oldVal = target.getTestResources();
551         List<Resource> newVal = transform(oldVal, this::transformResource);
552         return newVal != oldVal ? (builder != null ? builder : creator.get()).testResources(newVal) : builder;
553     }
554     protected Build.Builder transformBuild_Directory(Supplier<? extends Build.Builder> creator, Build.Builder builder, Build target) {
555         String oldVal = target.getDirectory();
556         String newVal = transform(oldVal);
557         return newVal != oldVal ? (builder != null ? builder : creator.get()).directory(newVal) : builder;
558     }
559     protected Build.Builder transformBuild_FinalName(Supplier<? extends Build.Builder> creator, Build.Builder builder, Build target) {
560         String oldVal = target.getFinalName();
561         String newVal = transform(oldVal);
562         return newVal != oldVal ? (builder != null ? builder : creator.get()).finalName(newVal) : builder;
563     }
564     protected Build.Builder transformBuild_Filters(Supplier<? extends Build.Builder> creator, Build.Builder builder, Build target) {
565         List<String> oldVal = target.getFilters();
566         List<String> newVal = transform(oldVal, this::transform);
567         return newVal != oldVal ? (builder != null ? builder : creator.get()).filters(newVal) : builder;
568     }
569     protected Build.Builder transformBuild_PluginManagement(Supplier<? extends Build.Builder> creator, Build.Builder builder, Build target) {
570         PluginManagement oldVal = target.getPluginManagement();
571         PluginManagement newVal = transformPluginManagement(oldVal);
572         return newVal != oldVal ? (builder != null ? builder : creator.get()).pluginManagement(newVal) : builder;
573     }
574     protected Build.Builder transformBuild_Plugins(Supplier<? extends Build.Builder> creator, Build.Builder builder, Build target) {
575         List<Plugin> oldVal = target.getPlugins();
576         List<Plugin> newVal = transform(oldVal, this::transformPlugin);
577         return newVal != oldVal ? (builder != null ? builder : creator.get()).plugins(newVal) : builder;
578     }
579 
580     protected CiManagement transformCiManagement(CiManagement target) {
581         if (target == null) {
582             return null;
583         }
584         Supplier<CiManagement.Builder> creator = () -> CiManagement.newBuilder(target);
585         CiManagement.Builder builder = null;
586         builder = (CiManagement.Builder) transformCiManagement_System(creator, builder, target);
587         builder = (CiManagement.Builder) transformCiManagement_Url(creator, builder, target);
588         builder = (CiManagement.Builder) transformCiManagement_Notifiers(creator, builder, target);
589         return builder != null ? builder.build() : target;
590     }
591 
592     protected CiManagement.Builder transformCiManagement_System(Supplier<? extends CiManagement.Builder> creator, CiManagement.Builder builder, CiManagement target) {
593         String oldVal = target.getSystem();
594         String newVal = transform(oldVal);
595         return newVal != oldVal ? (builder != null ? builder : creator.get()).system(newVal) : builder;
596     }
597     protected CiManagement.Builder transformCiManagement_Url(Supplier<? extends CiManagement.Builder> creator, CiManagement.Builder builder, CiManagement target) {
598         String oldVal = target.getUrl();
599         String newVal = transform(oldVal);
600         return newVal != oldVal ? (builder != null ? builder : creator.get()).url(newVal) : builder;
601     }
602     protected CiManagement.Builder transformCiManagement_Notifiers(Supplier<? extends CiManagement.Builder> creator, CiManagement.Builder builder, CiManagement target) {
603         List<Notifier> oldVal = target.getNotifiers();
604         List<Notifier> newVal = transform(oldVal, this::transformNotifier);
605         return newVal != oldVal ? (builder != null ? builder : creator.get()).notifiers(newVal) : builder;
606     }
607 
608     protected Notifier transformNotifier(Notifier target) {
609         if (target == null) {
610             return null;
611         }
612         Supplier<Notifier.Builder> creator = () -> Notifier.newBuilder(target);
613         Notifier.Builder builder = null;
614         builder = (Notifier.Builder) transformNotifier_Type(creator, builder, target);
615         builder = (Notifier.Builder) transformNotifier_SendOnError(creator, builder, target);
616         builder = (Notifier.Builder) transformNotifier_SendOnFailure(creator, builder, target);
617         builder = (Notifier.Builder) transformNotifier_SendOnSuccess(creator, builder, target);
618         builder = (Notifier.Builder) transformNotifier_SendOnWarning(creator, builder, target);
619         builder = (Notifier.Builder) transformNotifier_Address(creator, builder, target);
620         builder = (Notifier.Builder) transformNotifier_Configuration(creator, builder, target);
621         return builder != null ? builder.build() : target;
622     }
623 
624     protected Notifier.Builder transformNotifier_Type(Supplier<? extends Notifier.Builder> creator, Notifier.Builder builder, Notifier target) {
625         String oldVal = target.getType();
626         String newVal = transform(oldVal);
627         return newVal != oldVal ? (builder != null ? builder : creator.get()).type(newVal) : builder;
628     }
629     protected Notifier.Builder transformNotifier_SendOnError(Supplier<? extends Notifier.Builder> creator, Notifier.Builder builder, Notifier target) {
630         // nothing to do, the transformer only handles strings
631         return builder;
632     }
633     protected Notifier.Builder transformNotifier_SendOnFailure(Supplier<? extends Notifier.Builder> creator, Notifier.Builder builder, Notifier target) {
634         // nothing to do, the transformer only handles strings
635         return builder;
636     }
637     protected Notifier.Builder transformNotifier_SendOnSuccess(Supplier<? extends Notifier.Builder> creator, Notifier.Builder builder, Notifier target) {
638         // nothing to do, the transformer only handles strings
639         return builder;
640     }
641     protected Notifier.Builder transformNotifier_SendOnWarning(Supplier<? extends Notifier.Builder> creator, Notifier.Builder builder, Notifier target) {
642         // nothing to do, the transformer only handles strings
643         return builder;
644     }
645     protected Notifier.Builder transformNotifier_Address(Supplier<? extends Notifier.Builder> creator, Notifier.Builder builder, Notifier target) {
646         String oldVal = target.getAddress();
647         String newVal = transform(oldVal);
648         return newVal != oldVal ? (builder != null ? builder : creator.get()).address(newVal) : builder;
649     }
650     protected Notifier.Builder transformNotifier_Configuration(Supplier<? extends Notifier.Builder> creator, Notifier.Builder builder, Notifier target) {
651         Map<String, String> props = target.getConfiguration();
652         Map<String, String> newProps = null;
653         for (Map.Entry<String, String> entry : props.entrySet()) {
654             String newVal = transform(entry.getValue());
655             if (newVal != null && newVal != entry.getValue()) {
656                 if (newProps == null) {
657                     newProps = new HashMap<>();
658                     newProps.putAll(props);
659                     builder = builder != null ? builder : creator.get();
660                     builder.configuration(newProps);
661                 }
662                 newProps.put(entry.getKey(), newVal);
663             }
664         }
665         return builder;
666     }
667 
668     protected Contributor transformContributor(Contributor target) {
669         if (target == null) {
670             return null;
671         }
672         Supplier<Contributor.Builder> creator = () -> Contributor.newBuilder(target);
673         Contributor.Builder builder = null;
674         builder = (Contributor.Builder) transformContributor_Name(creator, builder, target);
675         builder = (Contributor.Builder) transformContributor_Email(creator, builder, target);
676         builder = (Contributor.Builder) transformContributor_Url(creator, builder, target);
677         builder = (Contributor.Builder) transformContributor_Organization(creator, builder, target);
678         builder = (Contributor.Builder) transformContributor_OrganizationUrl(creator, builder, target);
679         builder = (Contributor.Builder) transformContributor_Roles(creator, builder, target);
680         builder = (Contributor.Builder) transformContributor_Timezone(creator, builder, target);
681         builder = (Contributor.Builder) transformContributor_Properties(creator, builder, target);
682         return builder != null ? builder.build() : target;
683     }
684 
685     protected Contributor.Builder transformContributor_Name(Supplier<? extends Contributor.Builder> creator, Contributor.Builder builder, Contributor target) {
686         String oldVal = target.getName();
687         String newVal = transform(oldVal);
688         return newVal != oldVal ? (builder != null ? builder : creator.get()).name(newVal) : builder;
689     }
690     protected Contributor.Builder transformContributor_Email(Supplier<? extends Contributor.Builder> creator, Contributor.Builder builder, Contributor target) {
691         String oldVal = target.getEmail();
692         String newVal = transform(oldVal);
693         return newVal != oldVal ? (builder != null ? builder : creator.get()).email(newVal) : builder;
694     }
695     protected Contributor.Builder transformContributor_Url(Supplier<? extends Contributor.Builder> creator, Contributor.Builder builder, Contributor target) {
696         String oldVal = target.getUrl();
697         String newVal = transform(oldVal);
698         return newVal != oldVal ? (builder != null ? builder : creator.get()).url(newVal) : builder;
699     }
700     protected Contributor.Builder transformContributor_Organization(Supplier<? extends Contributor.Builder> creator, Contributor.Builder builder, Contributor target) {
701         String oldVal = target.getOrganization();
702         String newVal = transform(oldVal);
703         return newVal != oldVal ? (builder != null ? builder : creator.get()).organization(newVal) : builder;
704     }
705     protected Contributor.Builder transformContributor_OrganizationUrl(Supplier<? extends Contributor.Builder> creator, Contributor.Builder builder, Contributor target) {
706         String oldVal = target.getOrganizationUrl();
707         String newVal = transform(oldVal);
708         return newVal != oldVal ? (builder != null ? builder : creator.get()).organizationUrl(newVal) : builder;
709     }
710     protected Contributor.Builder transformContributor_Roles(Supplier<? extends Contributor.Builder> creator, Contributor.Builder builder, Contributor target) {
711         List<String> oldVal = target.getRoles();
712         List<String> newVal = transform(oldVal, this::transform);
713         return newVal != oldVal ? (builder != null ? builder : creator.get()).roles(newVal) : builder;
714     }
715     protected Contributor.Builder transformContributor_Timezone(Supplier<? extends Contributor.Builder> creator, Contributor.Builder builder, Contributor target) {
716         String oldVal = target.getTimezone();
717         String newVal = transform(oldVal);
718         return newVal != oldVal ? (builder != null ? builder : creator.get()).timezone(newVal) : builder;
719     }
720     protected Contributor.Builder transformContributor_Properties(Supplier<? extends Contributor.Builder> creator, Contributor.Builder builder, Contributor target) {
721         Map<String, String> props = target.getProperties();
722         Map<String, String> newProps = null;
723         for (Map.Entry<String, String> entry : props.entrySet()) {
724             String newVal = transform(entry.getValue());
725             if (newVal != null && newVal != entry.getValue()) {
726                 if (newProps == null) {
727                     newProps = new HashMap<>();
728                     newProps.putAll(props);
729                     builder = builder != null ? builder : creator.get();
730                     builder.properties(newProps);
731                 }
732                 newProps.put(entry.getKey(), newVal);
733             }
734         }
735         return builder;
736     }
737 
738     protected Dependency transformDependency(Dependency target) {
739         if (target == null) {
740             return null;
741         }
742         Supplier<Dependency.Builder> creator = () -> Dependency.newBuilder(target);
743         Dependency.Builder builder = null;
744         builder = (Dependency.Builder) transformDependency_GroupId(creator, builder, target);
745         builder = (Dependency.Builder) transformDependency_ArtifactId(creator, builder, target);
746         builder = (Dependency.Builder) transformDependency_Version(creator, builder, target);
747         builder = (Dependency.Builder) transformDependency_Type(creator, builder, target);
748         builder = (Dependency.Builder) transformDependency_Classifier(creator, builder, target);
749         builder = (Dependency.Builder) transformDependency_Scope(creator, builder, target);
750         builder = (Dependency.Builder) transformDependency_SystemPath(creator, builder, target);
751         builder = (Dependency.Builder) transformDependency_Exclusions(creator, builder, target);
752         builder = (Dependency.Builder) transformDependency_Optional(creator, builder, target);
753         return builder != null ? builder.build() : target;
754     }
755 
756     protected Dependency.Builder transformDependency_GroupId(Supplier<? extends Dependency.Builder> creator, Dependency.Builder builder, Dependency target) {
757         String oldVal = target.getGroupId();
758         String newVal = transform(oldVal);
759         return newVal != oldVal ? (builder != null ? builder : creator.get()).groupId(newVal) : builder;
760     }
761     protected Dependency.Builder transformDependency_ArtifactId(Supplier<? extends Dependency.Builder> creator, Dependency.Builder builder, Dependency target) {
762         String oldVal = target.getArtifactId();
763         String newVal = transform(oldVal);
764         return newVal != oldVal ? (builder != null ? builder : creator.get()).artifactId(newVal) : builder;
765     }
766     protected Dependency.Builder transformDependency_Version(Supplier<? extends Dependency.Builder> creator, Dependency.Builder builder, Dependency target) {
767         String oldVal = target.getVersion();
768         String newVal = transform(oldVal);
769         return newVal != oldVal ? (builder != null ? builder : creator.get()).version(newVal) : builder;
770     }
771     protected Dependency.Builder transformDependency_Type(Supplier<? extends Dependency.Builder> creator, Dependency.Builder builder, Dependency target) {
772         String oldVal = target.getType();
773         String newVal = transform(oldVal);
774         return newVal != oldVal ? (builder != null ? builder : creator.get()).type(newVal) : builder;
775     }
776     protected Dependency.Builder transformDependency_Classifier(Supplier<? extends Dependency.Builder> creator, Dependency.Builder builder, Dependency target) {
777         String oldVal = target.getClassifier();
778         String newVal = transform(oldVal);
779         return newVal != oldVal ? (builder != null ? builder : creator.get()).classifier(newVal) : builder;
780     }
781     protected Dependency.Builder transformDependency_Scope(Supplier<? extends Dependency.Builder> creator, Dependency.Builder builder, Dependency target) {
782         String oldVal = target.getScope();
783         String newVal = transform(oldVal);
784         return newVal != oldVal ? (builder != null ? builder : creator.get()).scope(newVal) : builder;
785     }
786     protected Dependency.Builder transformDependency_SystemPath(Supplier<? extends Dependency.Builder> creator, Dependency.Builder builder, Dependency target) {
787         String oldVal = target.getSystemPath();
788         String newVal = transform(oldVal);
789         return newVal != oldVal ? (builder != null ? builder : creator.get()).systemPath(newVal) : builder;
790     }
791     protected Dependency.Builder transformDependency_Exclusions(Supplier<? extends Dependency.Builder> creator, Dependency.Builder builder, Dependency target) {
792         List<Exclusion> oldVal = target.getExclusions();
793         List<Exclusion> newVal = transform(oldVal, this::transformExclusion);
794         return newVal != oldVal ? (builder != null ? builder : creator.get()).exclusions(newVal) : builder;
795     }
796     protected Dependency.Builder transformDependency_Optional(Supplier<? extends Dependency.Builder> creator, Dependency.Builder builder, Dependency target) {
797         String oldVal = target.getOptional();
798         String newVal = transform(oldVal);
799         return newVal != oldVal ? (builder != null ? builder : creator.get()).optional(newVal) : builder;
800     }
801 
802     protected Developer transformDeveloper(Developer target) {
803         if (target == null) {
804             return null;
805         }
806         Supplier<Developer.Builder> creator = () -> Developer.newBuilder(target);
807         Developer.Builder builder = null;
808         builder = (Developer.Builder) transformDeveloper_Id(creator, builder, target);
809         builder = (Developer.Builder) transformContributor_Name(creator, builder, target);
810         builder = (Developer.Builder) transformContributor_Email(creator, builder, target);
811         builder = (Developer.Builder) transformContributor_Url(creator, builder, target);
812         builder = (Developer.Builder) transformContributor_Organization(creator, builder, target);
813         builder = (Developer.Builder) transformContributor_OrganizationUrl(creator, builder, target);
814         builder = (Developer.Builder) transformContributor_Roles(creator, builder, target);
815         builder = (Developer.Builder) transformContributor_Timezone(creator, builder, target);
816         builder = (Developer.Builder) transformContributor_Properties(creator, builder, target);
817         return builder != null ? builder.build() : target;
818     }
819 
820     protected Developer.Builder transformDeveloper_Id(Supplier<? extends Developer.Builder> creator, Developer.Builder builder, Developer target) {
821         String oldVal = target.getId();
822         String newVal = transform(oldVal);
823         return newVal != oldVal ? (builder != null ? builder : creator.get()).id(newVal) : builder;
824     }
825     protected Developer.Builder transformDeveloper_Name(Supplier<? extends Developer.Builder> creator, Developer.Builder builder, Developer target) {
826         String oldVal = target.getName();
827         String newVal = transform(oldVal);
828         return newVal != oldVal ? (builder != null ? builder : creator.get()).name(newVal) : builder;
829     }
830     protected Developer.Builder transformDeveloper_Email(Supplier<? extends Developer.Builder> creator, Developer.Builder builder, Developer target) {
831         String oldVal = target.getEmail();
832         String newVal = transform(oldVal);
833         return newVal != oldVal ? (builder != null ? builder : creator.get()).email(newVal) : builder;
834     }
835     protected Developer.Builder transformDeveloper_Url(Supplier<? extends Developer.Builder> creator, Developer.Builder builder, Developer target) {
836         String oldVal = target.getUrl();
837         String newVal = transform(oldVal);
838         return newVal != oldVal ? (builder != null ? builder : creator.get()).url(newVal) : builder;
839     }
840     protected Developer.Builder transformDeveloper_Organization(Supplier<? extends Developer.Builder> creator, Developer.Builder builder, Developer target) {
841         String oldVal = target.getOrganization();
842         String newVal = transform(oldVal);
843         return newVal != oldVal ? (builder != null ? builder : creator.get()).organization(newVal) : builder;
844     }
845     protected Developer.Builder transformDeveloper_OrganizationUrl(Supplier<? extends Developer.Builder> creator, Developer.Builder builder, Developer target) {
846         String oldVal = target.getOrganizationUrl();
847         String newVal = transform(oldVal);
848         return newVal != oldVal ? (builder != null ? builder : creator.get()).organizationUrl(newVal) : builder;
849     }
850     protected Developer.Builder transformDeveloper_Roles(Supplier<? extends Developer.Builder> creator, Developer.Builder builder, Developer target) {
851         List<String> oldVal = target.getRoles();
852         List<String> newVal = transform(oldVal, this::transform);
853         return newVal != oldVal ? (builder != null ? builder : creator.get()).roles(newVal) : builder;
854     }
855     protected Developer.Builder transformDeveloper_Timezone(Supplier<? extends Developer.Builder> creator, Developer.Builder builder, Developer target) {
856         String oldVal = target.getTimezone();
857         String newVal = transform(oldVal);
858         return newVal != oldVal ? (builder != null ? builder : creator.get()).timezone(newVal) : builder;
859     }
860     protected Developer.Builder transformDeveloper_Properties(Supplier<? extends Developer.Builder> creator, Developer.Builder builder, Developer target) {
861         Map<String, String> props = target.getProperties();
862         Map<String, String> newProps = null;
863         for (Map.Entry<String, String> entry : props.entrySet()) {
864             String newVal = transform(entry.getValue());
865             if (newVal != null && newVal != entry.getValue()) {
866                 if (newProps == null) {
867                     newProps = new HashMap<>();
868                     newProps.putAll(props);
869                     builder = builder != null ? builder : creator.get();
870                     builder.properties(newProps);
871                 }
872                 newProps.put(entry.getKey(), newVal);
873             }
874         }
875         return builder;
876     }
877 
878     protected Exclusion transformExclusion(Exclusion target) {
879         if (target == null) {
880             return null;
881         }
882         Supplier<Exclusion.Builder> creator = () -> Exclusion.newBuilder(target);
883         Exclusion.Builder builder = null;
884         builder = (Exclusion.Builder) transformExclusion_GroupId(creator, builder, target);
885         builder = (Exclusion.Builder) transformExclusion_ArtifactId(creator, builder, target);
886         return builder != null ? builder.build() : target;
887     }
888 
889     protected Exclusion.Builder transformExclusion_GroupId(Supplier<? extends Exclusion.Builder> creator, Exclusion.Builder builder, Exclusion target) {
890         String oldVal = target.getGroupId();
891         String newVal = transform(oldVal);
892         return newVal != oldVal ? (builder != null ? builder : creator.get()).groupId(newVal) : builder;
893     }
894     protected Exclusion.Builder transformExclusion_ArtifactId(Supplier<? extends Exclusion.Builder> creator, Exclusion.Builder builder, Exclusion target) {
895         String oldVal = target.getArtifactId();
896         String newVal = transform(oldVal);
897         return newVal != oldVal ? (builder != null ? builder : creator.get()).artifactId(newVal) : builder;
898     }
899 
900     protected IssueManagement transformIssueManagement(IssueManagement target) {
901         if (target == null) {
902             return null;
903         }
904         Supplier<IssueManagement.Builder> creator = () -> IssueManagement.newBuilder(target);
905         IssueManagement.Builder builder = null;
906         builder = (IssueManagement.Builder) transformIssueManagement_System(creator, builder, target);
907         builder = (IssueManagement.Builder) transformIssueManagement_Url(creator, builder, target);
908         return builder != null ? builder.build() : target;
909     }
910 
911     protected IssueManagement.Builder transformIssueManagement_System(Supplier<? extends IssueManagement.Builder> creator, IssueManagement.Builder builder, IssueManagement target) {
912         String oldVal = target.getSystem();
913         String newVal = transform(oldVal);
914         return newVal != oldVal ? (builder != null ? builder : creator.get()).system(newVal) : builder;
915     }
916     protected IssueManagement.Builder transformIssueManagement_Url(Supplier<? extends IssueManagement.Builder> creator, IssueManagement.Builder builder, IssueManagement target) {
917         String oldVal = target.getUrl();
918         String newVal = transform(oldVal);
919         return newVal != oldVal ? (builder != null ? builder : creator.get()).url(newVal) : builder;
920     }
921 
922     protected DistributionManagement transformDistributionManagement(DistributionManagement target) {
923         if (target == null) {
924             return null;
925         }
926         Supplier<DistributionManagement.Builder> creator = () -> DistributionManagement.newBuilder(target);
927         DistributionManagement.Builder builder = null;
928         builder = (DistributionManagement.Builder) transformDistributionManagement_Repository(creator, builder, target);
929         builder = (DistributionManagement.Builder) transformDistributionManagement_SnapshotRepository(creator, builder, target);
930         builder = (DistributionManagement.Builder) transformDistributionManagement_Site(creator, builder, target);
931         builder = (DistributionManagement.Builder) transformDistributionManagement_DownloadUrl(creator, builder, target);
932         builder = (DistributionManagement.Builder) transformDistributionManagement_Relocation(creator, builder, target);
933         builder = (DistributionManagement.Builder) transformDistributionManagement_Status(creator, builder, target);
934         return builder != null ? builder.build() : target;
935     }
936 
937     protected DistributionManagement.Builder transformDistributionManagement_Repository(Supplier<? extends DistributionManagement.Builder> creator, DistributionManagement.Builder builder, DistributionManagement target) {
938         DeploymentRepository oldVal = target.getRepository();
939         DeploymentRepository newVal = transformDeploymentRepository(oldVal);
940         return newVal != oldVal ? (builder != null ? builder : creator.get()).repository(newVal) : builder;
941     }
942     protected DistributionManagement.Builder transformDistributionManagement_SnapshotRepository(Supplier<? extends DistributionManagement.Builder> creator, DistributionManagement.Builder builder, DistributionManagement target) {
943         DeploymentRepository oldVal = target.getSnapshotRepository();
944         DeploymentRepository newVal = transformDeploymentRepository(oldVal);
945         return newVal != oldVal ? (builder != null ? builder : creator.get()).snapshotRepository(newVal) : builder;
946     }
947     protected DistributionManagement.Builder transformDistributionManagement_Site(Supplier<? extends DistributionManagement.Builder> creator, DistributionManagement.Builder builder, DistributionManagement target) {
948         Site oldVal = target.getSite();
949         Site newVal = transformSite(oldVal);
950         return newVal != oldVal ? (builder != null ? builder : creator.get()).site(newVal) : builder;
951     }
952     protected DistributionManagement.Builder transformDistributionManagement_DownloadUrl(Supplier<? extends DistributionManagement.Builder> creator, DistributionManagement.Builder builder, DistributionManagement target) {
953         String oldVal = target.getDownloadUrl();
954         String newVal = transform(oldVal);
955         return newVal != oldVal ? (builder != null ? builder : creator.get()).downloadUrl(newVal) : builder;
956     }
957     protected DistributionManagement.Builder transformDistributionManagement_Relocation(Supplier<? extends DistributionManagement.Builder> creator, DistributionManagement.Builder builder, DistributionManagement target) {
958         Relocation oldVal = target.getRelocation();
959         Relocation newVal = transformRelocation(oldVal);
960         return newVal != oldVal ? (builder != null ? builder : creator.get()).relocation(newVal) : builder;
961     }
962     protected DistributionManagement.Builder transformDistributionManagement_Status(Supplier<? extends DistributionManagement.Builder> creator, DistributionManagement.Builder builder, DistributionManagement target) {
963         String oldVal = target.getStatus();
964         String newVal = transform(oldVal);
965         return newVal != oldVal ? (builder != null ? builder : creator.get()).status(newVal) : builder;
966     }
967 
968     protected License transformLicense(License target) {
969         if (target == null) {
970             return null;
971         }
972         Supplier<License.Builder> creator = () -> License.newBuilder(target);
973         License.Builder builder = null;
974         builder = (License.Builder) transformLicense_Name(creator, builder, target);
975         builder = (License.Builder) transformLicense_Url(creator, builder, target);
976         builder = (License.Builder) transformLicense_Distribution(creator, builder, target);
977         builder = (License.Builder) transformLicense_Comments(creator, builder, target);
978         return builder != null ? builder.build() : target;
979     }
980 
981     protected License.Builder transformLicense_Name(Supplier<? extends License.Builder> creator, License.Builder builder, License target) {
982         String oldVal = target.getName();
983         String newVal = transform(oldVal);
984         return newVal != oldVal ? (builder != null ? builder : creator.get()).name(newVal) : builder;
985     }
986     protected License.Builder transformLicense_Url(Supplier<? extends License.Builder> creator, License.Builder builder, License target) {
987         String oldVal = target.getUrl();
988         String newVal = transform(oldVal);
989         return newVal != oldVal ? (builder != null ? builder : creator.get()).url(newVal) : builder;
990     }
991     protected License.Builder transformLicense_Distribution(Supplier<? extends License.Builder> creator, License.Builder builder, License target) {
992         String oldVal = target.getDistribution();
993         String newVal = transform(oldVal);
994         return newVal != oldVal ? (builder != null ? builder : creator.get()).distribution(newVal) : builder;
995     }
996     protected License.Builder transformLicense_Comments(Supplier<? extends License.Builder> creator, License.Builder builder, License target) {
997         String oldVal = target.getComments();
998         String newVal = transform(oldVal);
999         return newVal != oldVal ? (builder != null ? builder : creator.get()).comments(newVal) : builder;
1000     }
1001 
1002     protected MailingList transformMailingList(MailingList target) {
1003         if (target == null) {
1004             return null;
1005         }
1006         Supplier<MailingList.Builder> creator = () -> MailingList.newBuilder(target);
1007         MailingList.Builder builder = null;
1008         builder = (MailingList.Builder) transformMailingList_Name(creator, builder, target);
1009         builder = (MailingList.Builder) transformMailingList_Subscribe(creator, builder, target);
1010         builder = (MailingList.Builder) transformMailingList_Unsubscribe(creator, builder, target);
1011         builder = (MailingList.Builder) transformMailingList_Post(creator, builder, target);
1012         builder = (MailingList.Builder) transformMailingList_Archive(creator, builder, target);
1013         builder = (MailingList.Builder) transformMailingList_OtherArchives(creator, builder, target);
1014         return builder != null ? builder.build() : target;
1015     }
1016 
1017     protected MailingList.Builder transformMailingList_Name(Supplier<? extends MailingList.Builder> creator, MailingList.Builder builder, MailingList target) {
1018         String oldVal = target.getName();
1019         String newVal = transform(oldVal);
1020         return newVal != oldVal ? (builder != null ? builder : creator.get()).name(newVal) : builder;
1021     }
1022     protected MailingList.Builder transformMailingList_Subscribe(Supplier<? extends MailingList.Builder> creator, MailingList.Builder builder, MailingList target) {
1023         String oldVal = target.getSubscribe();
1024         String newVal = transform(oldVal);
1025         return newVal != oldVal ? (builder != null ? builder : creator.get()).subscribe(newVal) : builder;
1026     }
1027     protected MailingList.Builder transformMailingList_Unsubscribe(Supplier<? extends MailingList.Builder> creator, MailingList.Builder builder, MailingList target) {
1028         String oldVal = target.getUnsubscribe();
1029         String newVal = transform(oldVal);
1030         return newVal != oldVal ? (builder != null ? builder : creator.get()).unsubscribe(newVal) : builder;
1031     }
1032     protected MailingList.Builder transformMailingList_Post(Supplier<? extends MailingList.Builder> creator, MailingList.Builder builder, MailingList target) {
1033         String oldVal = target.getPost();
1034         String newVal = transform(oldVal);
1035         return newVal != oldVal ? (builder != null ? builder : creator.get()).post(newVal) : builder;
1036     }
1037     protected MailingList.Builder transformMailingList_Archive(Supplier<? extends MailingList.Builder> creator, MailingList.Builder builder, MailingList target) {
1038         String oldVal = target.getArchive();
1039         String newVal = transform(oldVal);
1040         return newVal != oldVal ? (builder != null ? builder : creator.get()).archive(newVal) : builder;
1041     }
1042     protected MailingList.Builder transformMailingList_OtherArchives(Supplier<? extends MailingList.Builder> creator, MailingList.Builder builder, MailingList target) {
1043         List<String> oldVal = target.getOtherArchives();
1044         List<String> newVal = transform(oldVal, this::transform);
1045         return newVal != oldVal ? (builder != null ? builder : creator.get()).otherArchives(newVal) : builder;
1046     }
1047 
1048     protected Organization transformOrganization(Organization target) {
1049         if (target == null) {
1050             return null;
1051         }
1052         Supplier<Organization.Builder> creator = () -> Organization.newBuilder(target);
1053         Organization.Builder builder = null;
1054         builder = (Organization.Builder) transformOrganization_Name(creator, builder, target);
1055         builder = (Organization.Builder) transformOrganization_Url(creator, builder, target);
1056         return builder != null ? builder.build() : target;
1057     }
1058 
1059     protected Organization.Builder transformOrganization_Name(Supplier<? extends Organization.Builder> creator, Organization.Builder builder, Organization target) {
1060         String oldVal = target.getName();
1061         String newVal = transform(oldVal);
1062         return newVal != oldVal ? (builder != null ? builder : creator.get()).name(newVal) : builder;
1063     }
1064     protected Organization.Builder transformOrganization_Url(Supplier<? extends Organization.Builder> creator, Organization.Builder builder, Organization target) {
1065         String oldVal = target.getUrl();
1066         String newVal = transform(oldVal);
1067         return newVal != oldVal ? (builder != null ? builder : creator.get()).url(newVal) : builder;
1068     }
1069 
1070     protected PatternSet transformPatternSet(PatternSet target) {
1071         if (target == null) {
1072             return null;
1073         }
1074         Supplier<PatternSet.Builder> creator = () -> PatternSet.newBuilder(target);
1075         PatternSet.Builder builder = null;
1076         builder = (PatternSet.Builder) transformPatternSet_Includes(creator, builder, target);
1077         builder = (PatternSet.Builder) transformPatternSet_Excludes(creator, builder, target);
1078         return builder != null ? builder.build() : target;
1079     }
1080 
1081     protected PatternSet.Builder transformPatternSet_Includes(Supplier<? extends PatternSet.Builder> creator, PatternSet.Builder builder, PatternSet target) {
1082         List<String> oldVal = target.getIncludes();
1083         List<String> newVal = transform(oldVal, this::transform);
1084         return newVal != oldVal ? (builder != null ? builder : creator.get()).includes(newVal) : builder;
1085     }
1086     protected PatternSet.Builder transformPatternSet_Excludes(Supplier<? extends PatternSet.Builder> creator, PatternSet.Builder builder, PatternSet target) {
1087         List<String> oldVal = target.getExcludes();
1088         List<String> newVal = transform(oldVal, this::transform);
1089         return newVal != oldVal ? (builder != null ? builder : creator.get()).excludes(newVal) : builder;
1090     }
1091 
1092     protected Parent transformParent(Parent target) {
1093         if (target == null) {
1094             return null;
1095         }
1096         Supplier<Parent.Builder> creator = () -> Parent.newBuilder(target);
1097         Parent.Builder builder = null;
1098         builder = (Parent.Builder) transformParent_GroupId(creator, builder, target);
1099         builder = (Parent.Builder) transformParent_ArtifactId(creator, builder, target);
1100         builder = (Parent.Builder) transformParent_Version(creator, builder, target);
1101         builder = (Parent.Builder) transformParent_RelativePath(creator, builder, target);
1102         return builder != null ? builder.build() : target;
1103     }
1104 
1105     protected Parent.Builder transformParent_GroupId(Supplier<? extends Parent.Builder> creator, Parent.Builder builder, Parent target) {
1106         String oldVal = target.getGroupId();
1107         String newVal = transform(oldVal);
1108         return newVal != oldVal ? (builder != null ? builder : creator.get()).groupId(newVal) : builder;
1109     }
1110     protected Parent.Builder transformParent_ArtifactId(Supplier<? extends Parent.Builder> creator, Parent.Builder builder, Parent target) {
1111         String oldVal = target.getArtifactId();
1112         String newVal = transform(oldVal);
1113         return newVal != oldVal ? (builder != null ? builder : creator.get()).artifactId(newVal) : builder;
1114     }
1115     protected Parent.Builder transformParent_Version(Supplier<? extends Parent.Builder> creator, Parent.Builder builder, Parent target) {
1116         String oldVal = target.getVersion();
1117         String newVal = transform(oldVal);
1118         return newVal != oldVal ? (builder != null ? builder : creator.get()).version(newVal) : builder;
1119     }
1120     protected Parent.Builder transformParent_RelativePath(Supplier<? extends Parent.Builder> creator, Parent.Builder builder, Parent target) {
1121         String oldVal = target.getRelativePath();
1122         String newVal = transform(oldVal);
1123         return newVal != oldVal ? (builder != null ? builder : creator.get()).relativePath(newVal) : builder;
1124     }
1125 
1126     protected Scm transformScm(Scm target) {
1127         if (target == null) {
1128             return null;
1129         }
1130         Supplier<Scm.Builder> creator = () -> Scm.newBuilder(target);
1131         Scm.Builder builder = null;
1132         builder = (Scm.Builder) transformScm_Connection(creator, builder, target);
1133         builder = (Scm.Builder) transformScm_DeveloperConnection(creator, builder, target);
1134         builder = (Scm.Builder) transformScm_Tag(creator, builder, target);
1135         builder = (Scm.Builder) transformScm_Url(creator, builder, target);
1136         builder = (Scm.Builder) transformScm_ChildScmConnectionInheritAppendPath(creator, builder, target);
1137         builder = (Scm.Builder) transformScm_ChildScmDeveloperConnectionInheritAppendPath(creator, builder, target);
1138         builder = (Scm.Builder) transformScm_ChildScmUrlInheritAppendPath(creator, builder, target);
1139         return builder != null ? builder.build() : target;
1140     }
1141 
1142     protected Scm.Builder transformScm_Connection(Supplier<? extends Scm.Builder> creator, Scm.Builder builder, Scm target) {
1143         String oldVal = target.getConnection();
1144         String newVal = transform(oldVal);
1145         return newVal != oldVal ? (builder != null ? builder : creator.get()).connection(newVal) : builder;
1146     }
1147     protected Scm.Builder transformScm_DeveloperConnection(Supplier<? extends Scm.Builder> creator, Scm.Builder builder, Scm target) {
1148         String oldVal = target.getDeveloperConnection();
1149         String newVal = transform(oldVal);
1150         return newVal != oldVal ? (builder != null ? builder : creator.get()).developerConnection(newVal) : builder;
1151     }
1152     protected Scm.Builder transformScm_Tag(Supplier<? extends Scm.Builder> creator, Scm.Builder builder, Scm target) {
1153         String oldVal = target.getTag();
1154         String newVal = transform(oldVal);
1155         return newVal != oldVal ? (builder != null ? builder : creator.get()).tag(newVal) : builder;
1156     }
1157     protected Scm.Builder transformScm_Url(Supplier<? extends Scm.Builder> creator, Scm.Builder builder, Scm target) {
1158         String oldVal = target.getUrl();
1159         String newVal = transform(oldVal);
1160         return newVal != oldVal ? (builder != null ? builder : creator.get()).url(newVal) : builder;
1161     }
1162     protected Scm.Builder transformScm_ChildScmConnectionInheritAppendPath(Supplier<? extends Scm.Builder> creator, Scm.Builder builder, Scm target) {
1163         String oldVal = target.getChildScmConnectionInheritAppendPath();
1164         String newVal = transform(oldVal);
1165         return newVal != oldVal ? (builder != null ? builder : creator.get()).childScmConnectionInheritAppendPath(newVal) : builder;
1166     }
1167     protected Scm.Builder transformScm_ChildScmDeveloperConnectionInheritAppendPath(Supplier<? extends Scm.Builder> creator, Scm.Builder builder, Scm target) {
1168         String oldVal = target.getChildScmDeveloperConnectionInheritAppendPath();
1169         String newVal = transform(oldVal);
1170         return newVal != oldVal ? (builder != null ? builder : creator.get()).childScmDeveloperConnectionInheritAppendPath(newVal) : builder;
1171     }
1172     protected Scm.Builder transformScm_ChildScmUrlInheritAppendPath(Supplier<? extends Scm.Builder> creator, Scm.Builder builder, Scm target) {
1173         String oldVal = target.getChildScmUrlInheritAppendPath();
1174         String newVal = transform(oldVal);
1175         return newVal != oldVal ? (builder != null ? builder : creator.get()).childScmUrlInheritAppendPath(newVal) : builder;
1176     }
1177 
1178     protected FileSet transformFileSet(FileSet target) {
1179         if (target == null) {
1180             return null;
1181         }
1182         Supplier<FileSet.Builder> creator = () -> FileSet.newBuilder(target);
1183         FileSet.Builder builder = null;
1184         builder = (FileSet.Builder) transformFileSet_Directory(creator, builder, target);
1185         builder = (FileSet.Builder) transformPatternSet_Includes(creator, builder, target);
1186         builder = (FileSet.Builder) transformPatternSet_Excludes(creator, builder, target);
1187         return builder != null ? builder.build() : target;
1188     }
1189 
1190     protected FileSet.Builder transformFileSet_Directory(Supplier<? extends FileSet.Builder> creator, FileSet.Builder builder, FileSet target) {
1191         String oldVal = target.getDirectory();
1192         String newVal = transform(oldVal);
1193         return newVal != oldVal ? (builder != null ? builder : creator.get()).directory(newVal) : builder;
1194     }
1195     protected FileSet.Builder transformFileSet_Includes(Supplier<? extends FileSet.Builder> creator, FileSet.Builder builder, FileSet target) {
1196         List<String> oldVal = target.getIncludes();
1197         List<String> newVal = transform(oldVal, this::transform);
1198         return newVal != oldVal ? (builder != null ? builder : creator.get()).includes(newVal) : builder;
1199     }
1200     protected FileSet.Builder transformFileSet_Excludes(Supplier<? extends FileSet.Builder> creator, FileSet.Builder builder, FileSet target) {
1201         List<String> oldVal = target.getExcludes();
1202         List<String> newVal = transform(oldVal, this::transform);
1203         return newVal != oldVal ? (builder != null ? builder : creator.get()).excludes(newVal) : builder;
1204     }
1205 
1206     protected Resource transformResource(Resource target) {
1207         if (target == null) {
1208             return null;
1209         }
1210         Supplier<Resource.Builder> creator = () -> Resource.newBuilder(target);
1211         Resource.Builder builder = null;
1212         builder = (Resource.Builder) transformResource_TargetPath(creator, builder, target);
1213         builder = (Resource.Builder) transformResource_Filtering(creator, builder, target);
1214         builder = (Resource.Builder) transformFileSet_Directory(creator, builder, target);
1215         builder = (Resource.Builder) transformPatternSet_Includes(creator, builder, target);
1216         builder = (Resource.Builder) transformPatternSet_Excludes(creator, builder, target);
1217         return builder != null ? builder.build() : target;
1218     }
1219 
1220     protected Resource.Builder transformResource_TargetPath(Supplier<? extends Resource.Builder> creator, Resource.Builder builder, Resource target) {
1221         String oldVal = target.getTargetPath();
1222         String newVal = transform(oldVal);
1223         return newVal != oldVal ? (builder != null ? builder : creator.get()).targetPath(newVal) : builder;
1224     }
1225     protected Resource.Builder transformResource_Filtering(Supplier<? extends Resource.Builder> creator, Resource.Builder builder, Resource target) {
1226         String oldVal = target.getFiltering();
1227         String newVal = transform(oldVal);
1228         return newVal != oldVal ? (builder != null ? builder : creator.get()).filtering(newVal) : builder;
1229     }
1230     protected Resource.Builder transformResource_Directory(Supplier<? extends Resource.Builder> creator, Resource.Builder builder, Resource target) {
1231         String oldVal = target.getDirectory();
1232         String newVal = transform(oldVal);
1233         return newVal != oldVal ? (builder != null ? builder : creator.get()).directory(newVal) : builder;
1234     }
1235     protected Resource.Builder transformResource_Includes(Supplier<? extends Resource.Builder> creator, Resource.Builder builder, Resource target) {
1236         List<String> oldVal = target.getIncludes();
1237         List<String> newVal = transform(oldVal, this::transform);
1238         return newVal != oldVal ? (builder != null ? builder : creator.get()).includes(newVal) : builder;
1239     }
1240     protected Resource.Builder transformResource_Excludes(Supplier<? extends Resource.Builder> creator, Resource.Builder builder, Resource target) {
1241         List<String> oldVal = target.getExcludes();
1242         List<String> newVal = transform(oldVal, this::transform);
1243         return newVal != oldVal ? (builder != null ? builder : creator.get()).excludes(newVal) : builder;
1244     }
1245 
1246     protected RepositoryBase transformRepositoryBase(RepositoryBase target) {
1247         if (target == null) {
1248             return null;
1249         }
1250         Supplier<RepositoryBase.Builder> creator = () -> RepositoryBase.newBuilder(target);
1251         RepositoryBase.Builder builder = null;
1252         builder = (RepositoryBase.Builder) transformRepositoryBase_Id(creator, builder, target);
1253         builder = (RepositoryBase.Builder) transformRepositoryBase_Name(creator, builder, target);
1254         builder = (RepositoryBase.Builder) transformRepositoryBase_Url(creator, builder, target);
1255         builder = (RepositoryBase.Builder) transformRepositoryBase_Layout(creator, builder, target);
1256         return builder != null ? builder.build() : target;
1257     }
1258 
1259     protected RepositoryBase.Builder transformRepositoryBase_Id(Supplier<? extends RepositoryBase.Builder> creator, RepositoryBase.Builder builder, RepositoryBase target) {
1260         String oldVal = target.getId();
1261         String newVal = transform(oldVal);
1262         return newVal != oldVal ? (builder != null ? builder : creator.get()).id(newVal) : builder;
1263     }
1264     protected RepositoryBase.Builder transformRepositoryBase_Name(Supplier<? extends RepositoryBase.Builder> creator, RepositoryBase.Builder builder, RepositoryBase target) {
1265         String oldVal = target.getName();
1266         String newVal = transform(oldVal);
1267         return newVal != oldVal ? (builder != null ? builder : creator.get()).name(newVal) : builder;
1268     }
1269     protected RepositoryBase.Builder transformRepositoryBase_Url(Supplier<? extends RepositoryBase.Builder> creator, RepositoryBase.Builder builder, RepositoryBase target) {
1270         String oldVal = target.getUrl();
1271         String newVal = transform(oldVal);
1272         return newVal != oldVal ? (builder != null ? builder : creator.get()).url(newVal) : builder;
1273     }
1274     protected RepositoryBase.Builder transformRepositoryBase_Layout(Supplier<? extends RepositoryBase.Builder> creator, RepositoryBase.Builder builder, RepositoryBase target) {
1275         String oldVal = target.getLayout();
1276         String newVal = transform(oldVal);
1277         return newVal != oldVal ? (builder != null ? builder : creator.get()).layout(newVal) : builder;
1278     }
1279 
1280     protected Repository transformRepository(Repository target) {
1281         if (target == null) {
1282             return null;
1283         }
1284         Supplier<Repository.Builder> creator = () -> Repository.newBuilder(target);
1285         Repository.Builder builder = null;
1286         builder = (Repository.Builder) transformRepository_Releases(creator, builder, target);
1287         builder = (Repository.Builder) transformRepository_Snapshots(creator, builder, target);
1288         builder = (Repository.Builder) transformRepositoryBase_Id(creator, builder, target);
1289         builder = (Repository.Builder) transformRepositoryBase_Name(creator, builder, target);
1290         builder = (Repository.Builder) transformRepositoryBase_Url(creator, builder, target);
1291         builder = (Repository.Builder) transformRepositoryBase_Layout(creator, builder, target);
1292         return builder != null ? builder.build() : target;
1293     }
1294 
1295     protected Repository.Builder transformRepository_Releases(Supplier<? extends Repository.Builder> creator, Repository.Builder builder, Repository target) {
1296         RepositoryPolicy oldVal = target.getReleases();
1297         RepositoryPolicy newVal = transformRepositoryPolicy(oldVal);
1298         return newVal != oldVal ? (builder != null ? builder : creator.get()).releases(newVal) : builder;
1299     }
1300     protected Repository.Builder transformRepository_Snapshots(Supplier<? extends Repository.Builder> creator, Repository.Builder builder, Repository target) {
1301         RepositoryPolicy oldVal = target.getSnapshots();
1302         RepositoryPolicy newVal = transformRepositoryPolicy(oldVal);
1303         return newVal != oldVal ? (builder != null ? builder : creator.get()).snapshots(newVal) : builder;
1304     }
1305     protected Repository.Builder transformRepository_Id(Supplier<? extends Repository.Builder> creator, Repository.Builder builder, Repository target) {
1306         String oldVal = target.getId();
1307         String newVal = transform(oldVal);
1308         return newVal != oldVal ? (builder != null ? builder : creator.get()).id(newVal) : builder;
1309     }
1310     protected Repository.Builder transformRepository_Name(Supplier<? extends Repository.Builder> creator, Repository.Builder builder, Repository target) {
1311         String oldVal = target.getName();
1312         String newVal = transform(oldVal);
1313         return newVal != oldVal ? (builder != null ? builder : creator.get()).name(newVal) : builder;
1314     }
1315     protected Repository.Builder transformRepository_Url(Supplier<? extends Repository.Builder> creator, Repository.Builder builder, Repository target) {
1316         String oldVal = target.getUrl();
1317         String newVal = transform(oldVal);
1318         return newVal != oldVal ? (builder != null ? builder : creator.get()).url(newVal) : builder;
1319     }
1320     protected Repository.Builder transformRepository_Layout(Supplier<? extends Repository.Builder> creator, Repository.Builder builder, Repository target) {
1321         String oldVal = target.getLayout();
1322         String newVal = transform(oldVal);
1323         return newVal != oldVal ? (builder != null ? builder : creator.get()).layout(newVal) : builder;
1324     }
1325 
1326     protected DeploymentRepository transformDeploymentRepository(DeploymentRepository target) {
1327         if (target == null) {
1328             return null;
1329         }
1330         Supplier<DeploymentRepository.Builder> creator = () -> DeploymentRepository.newBuilder(target);
1331         DeploymentRepository.Builder builder = null;
1332         builder = (DeploymentRepository.Builder) transformDeploymentRepository_UniqueVersion(creator, builder, target);
1333         builder = (DeploymentRepository.Builder) transformRepository_Releases(creator, builder, target);
1334         builder = (DeploymentRepository.Builder) transformRepository_Snapshots(creator, builder, target);
1335         builder = (DeploymentRepository.Builder) transformRepositoryBase_Id(creator, builder, target);
1336         builder = (DeploymentRepository.Builder) transformRepositoryBase_Name(creator, builder, target);
1337         builder = (DeploymentRepository.Builder) transformRepositoryBase_Url(creator, builder, target);
1338         builder = (DeploymentRepository.Builder) transformRepositoryBase_Layout(creator, builder, target);
1339         return builder != null ? builder.build() : target;
1340     }
1341 
1342     protected DeploymentRepository.Builder transformDeploymentRepository_UniqueVersion(Supplier<? extends DeploymentRepository.Builder> creator, DeploymentRepository.Builder builder, DeploymentRepository target) {
1343         // nothing to do, the transformer only handles strings
1344         return builder;
1345     }
1346     protected DeploymentRepository.Builder transformDeploymentRepository_Releases(Supplier<? extends DeploymentRepository.Builder> creator, DeploymentRepository.Builder builder, DeploymentRepository target) {
1347         RepositoryPolicy oldVal = target.getReleases();
1348         RepositoryPolicy newVal = transformRepositoryPolicy(oldVal);
1349         return newVal != oldVal ? (builder != null ? builder : creator.get()).releases(newVal) : builder;
1350     }
1351     protected DeploymentRepository.Builder transformDeploymentRepository_Snapshots(Supplier<? extends DeploymentRepository.Builder> creator, DeploymentRepository.Builder builder, DeploymentRepository target) {
1352         RepositoryPolicy oldVal = target.getSnapshots();
1353         RepositoryPolicy newVal = transformRepositoryPolicy(oldVal);
1354         return newVal != oldVal ? (builder != null ? builder : creator.get()).snapshots(newVal) : builder;
1355     }
1356     protected DeploymentRepository.Builder transformDeploymentRepository_Id(Supplier<? extends DeploymentRepository.Builder> creator, DeploymentRepository.Builder builder, DeploymentRepository target) {
1357         String oldVal = target.getId();
1358         String newVal = transform(oldVal);
1359         return newVal != oldVal ? (builder != null ? builder : creator.get()).id(newVal) : builder;
1360     }
1361     protected DeploymentRepository.Builder transformDeploymentRepository_Name(Supplier<? extends DeploymentRepository.Builder> creator, DeploymentRepository.Builder builder, DeploymentRepository target) {
1362         String oldVal = target.getName();
1363         String newVal = transform(oldVal);
1364         return newVal != oldVal ? (builder != null ? builder : creator.get()).name(newVal) : builder;
1365     }
1366     protected DeploymentRepository.Builder transformDeploymentRepository_Url(Supplier<? extends DeploymentRepository.Builder> creator, DeploymentRepository.Builder builder, DeploymentRepository target) {
1367         String oldVal = target.getUrl();
1368         String newVal = transform(oldVal);
1369         return newVal != oldVal ? (builder != null ? builder : creator.get()).url(newVal) : builder;
1370     }
1371     protected DeploymentRepository.Builder transformDeploymentRepository_Layout(Supplier<? extends DeploymentRepository.Builder> creator, DeploymentRepository.Builder builder, DeploymentRepository target) {
1372         String oldVal = target.getLayout();
1373         String newVal = transform(oldVal);
1374         return newVal != oldVal ? (builder != null ? builder : creator.get()).layout(newVal) : builder;
1375     }
1376 
1377     protected RepositoryPolicy transformRepositoryPolicy(RepositoryPolicy target) {
1378         if (target == null) {
1379             return null;
1380         }
1381         Supplier<RepositoryPolicy.Builder> creator = () -> RepositoryPolicy.newBuilder(target);
1382         RepositoryPolicy.Builder builder = null;
1383         builder = (RepositoryPolicy.Builder) transformRepositoryPolicy_Enabled(creator, builder, target);
1384         builder = (RepositoryPolicy.Builder) transformRepositoryPolicy_UpdatePolicy(creator, builder, target);
1385         builder = (RepositoryPolicy.Builder) transformRepositoryPolicy_ChecksumPolicy(creator, builder, target);
1386         return builder != null ? builder.build() : target;
1387     }
1388 
1389     protected RepositoryPolicy.Builder transformRepositoryPolicy_Enabled(Supplier<? extends RepositoryPolicy.Builder> creator, RepositoryPolicy.Builder builder, RepositoryPolicy target) {
1390         String oldVal = target.getEnabled();
1391         String newVal = transform(oldVal);
1392         return newVal != oldVal ? (builder != null ? builder : creator.get()).enabled(newVal) : builder;
1393     }
1394     protected RepositoryPolicy.Builder transformRepositoryPolicy_UpdatePolicy(Supplier<? extends RepositoryPolicy.Builder> creator, RepositoryPolicy.Builder builder, RepositoryPolicy target) {
1395         String oldVal = target.getUpdatePolicy();
1396         String newVal = transform(oldVal);
1397         return newVal != oldVal ? (builder != null ? builder : creator.get()).updatePolicy(newVal) : builder;
1398     }
1399     protected RepositoryPolicy.Builder transformRepositoryPolicy_ChecksumPolicy(Supplier<? extends RepositoryPolicy.Builder> creator, RepositoryPolicy.Builder builder, RepositoryPolicy target) {
1400         String oldVal = target.getChecksumPolicy();
1401         String newVal = transform(oldVal);
1402         return newVal != oldVal ? (builder != null ? builder : creator.get()).checksumPolicy(newVal) : builder;
1403     }
1404 
1405     protected Site transformSite(Site target) {
1406         if (target == null) {
1407             return null;
1408         }
1409         Supplier<Site.Builder> creator = () -> Site.newBuilder(target);
1410         Site.Builder builder = null;
1411         builder = (Site.Builder) transformSite_Id(creator, builder, target);
1412         builder = (Site.Builder) transformSite_Name(creator, builder, target);
1413         builder = (Site.Builder) transformSite_Url(creator, builder, target);
1414         builder = (Site.Builder) transformSite_ChildSiteUrlInheritAppendPath(creator, builder, target);
1415         return builder != null ? builder.build() : target;
1416     }
1417 
1418     protected Site.Builder transformSite_Id(Supplier<? extends Site.Builder> creator, Site.Builder builder, Site target) {
1419         String oldVal = target.getId();
1420         String newVal = transform(oldVal);
1421         return newVal != oldVal ? (builder != null ? builder : creator.get()).id(newVal) : builder;
1422     }
1423     protected Site.Builder transformSite_Name(Supplier<? extends Site.Builder> creator, Site.Builder builder, Site target) {
1424         String oldVal = target.getName();
1425         String newVal = transform(oldVal);
1426         return newVal != oldVal ? (builder != null ? builder : creator.get()).name(newVal) : builder;
1427     }
1428     protected Site.Builder transformSite_Url(Supplier<? extends Site.Builder> creator, Site.Builder builder, Site target) {
1429         String oldVal = target.getUrl();
1430         String newVal = transform(oldVal);
1431         return newVal != oldVal ? (builder != null ? builder : creator.get()).url(newVal) : builder;
1432     }
1433     protected Site.Builder transformSite_ChildSiteUrlInheritAppendPath(Supplier<? extends Site.Builder> creator, Site.Builder builder, Site target) {
1434         String oldVal = target.getChildSiteUrlInheritAppendPath();
1435         String newVal = transform(oldVal);
1436         return newVal != oldVal ? (builder != null ? builder : creator.get()).childSiteUrlInheritAppendPath(newVal) : builder;
1437     }
1438 
1439     protected ConfigurationContainer transformConfigurationContainer(ConfigurationContainer target) {
1440         if (target == null) {
1441             return null;
1442         }
1443         Supplier<ConfigurationContainer.Builder> creator = () -> ConfigurationContainer.newBuilder(target);
1444         ConfigurationContainer.Builder builder = null;
1445         builder = (ConfigurationContainer.Builder) transformConfigurationContainer_Inherited(creator, builder, target);
1446         builder = (ConfigurationContainer.Builder) transformConfigurationContainer_Configuration(creator, builder, target);
1447         return builder != null ? builder.build() : target;
1448     }
1449 
1450     protected ConfigurationContainer.Builder transformConfigurationContainer_Inherited(Supplier<? extends ConfigurationContainer.Builder> creator, ConfigurationContainer.Builder builder, ConfigurationContainer target) {
1451         String oldVal = target.getInherited();
1452         String newVal = transform(oldVal);
1453         return newVal != oldVal ? (builder != null ? builder : creator.get()).inherited(newVal) : builder;
1454     }
1455     protected ConfigurationContainer.Builder transformConfigurationContainer_Configuration(Supplier<? extends ConfigurationContainer.Builder> creator, ConfigurationContainer.Builder builder, ConfigurationContainer target) {
1456         XmlNode oldVal = target.getConfiguration();
1457         XmlNode newVal = transform(oldVal);
1458         return newVal != oldVal ? (builder != null ? builder : creator.get()).configuration(newVal) : builder;
1459     }
1460 
1461     protected Plugin transformPlugin(Plugin target) {
1462         if (target == null) {
1463             return null;
1464         }
1465         Supplier<Plugin.Builder> creator = () -> Plugin.newBuilder(target);
1466         Plugin.Builder builder = null;
1467         builder = (Plugin.Builder) transformPlugin_GroupId(creator, builder, target);
1468         builder = (Plugin.Builder) transformPlugin_ArtifactId(creator, builder, target);
1469         builder = (Plugin.Builder) transformPlugin_Version(creator, builder, target);
1470         builder = (Plugin.Builder) transformPlugin_Extensions(creator, builder, target);
1471         builder = (Plugin.Builder) transformPlugin_Executions(creator, builder, target);
1472         builder = (Plugin.Builder) transformPlugin_Dependencies(creator, builder, target);
1473         builder = (Plugin.Builder) transformConfigurationContainer_Inherited(creator, builder, target);
1474         builder = (Plugin.Builder) transformConfigurationContainer_Configuration(creator, builder, target);
1475         return builder != null ? builder.build() : target;
1476     }
1477 
1478     protected Plugin.Builder transformPlugin_GroupId(Supplier<? extends Plugin.Builder> creator, Plugin.Builder builder, Plugin target) {
1479         String oldVal = target.getGroupId();
1480         String newVal = transform(oldVal);
1481         return newVal != oldVal ? (builder != null ? builder : creator.get()).groupId(newVal) : builder;
1482     }
1483     protected Plugin.Builder transformPlugin_ArtifactId(Supplier<? extends Plugin.Builder> creator, Plugin.Builder builder, Plugin target) {
1484         String oldVal = target.getArtifactId();
1485         String newVal = transform(oldVal);
1486         return newVal != oldVal ? (builder != null ? builder : creator.get()).artifactId(newVal) : builder;
1487     }
1488     protected Plugin.Builder transformPlugin_Version(Supplier<? extends Plugin.Builder> creator, Plugin.Builder builder, Plugin target) {
1489         String oldVal = target.getVersion();
1490         String newVal = transform(oldVal);
1491         return newVal != oldVal ? (builder != null ? builder : creator.get()).version(newVal) : builder;
1492     }
1493     protected Plugin.Builder transformPlugin_Extensions(Supplier<? extends Plugin.Builder> creator, Plugin.Builder builder, Plugin target) {
1494         String oldVal = target.getExtensions();
1495         String newVal = transform(oldVal);
1496         return newVal != oldVal ? (builder != null ? builder : creator.get()).extensions(newVal) : builder;
1497     }
1498     protected Plugin.Builder transformPlugin_Executions(Supplier<? extends Plugin.Builder> creator, Plugin.Builder builder, Plugin target) {
1499         List<PluginExecution> oldVal = target.getExecutions();
1500         List<PluginExecution> newVal = transform(oldVal, this::transformPluginExecution);
1501         return newVal != oldVal ? (builder != null ? builder : creator.get()).executions(newVal) : builder;
1502     }
1503     protected Plugin.Builder transformPlugin_Dependencies(Supplier<? extends Plugin.Builder> creator, Plugin.Builder builder, Plugin target) {
1504         List<Dependency> oldVal = target.getDependencies();
1505         List<Dependency> newVal = transform(oldVal, this::transformDependency);
1506         return newVal != oldVal ? (builder != null ? builder : creator.get()).dependencies(newVal) : builder;
1507     }
1508     protected Plugin.Builder transformPlugin_Inherited(Supplier<? extends Plugin.Builder> creator, Plugin.Builder builder, Plugin target) {
1509         String oldVal = target.getInherited();
1510         String newVal = transform(oldVal);
1511         return newVal != oldVal ? (builder != null ? builder : creator.get()).inherited(newVal) : builder;
1512     }
1513     protected Plugin.Builder transformPlugin_Configuration(Supplier<? extends Plugin.Builder> creator, Plugin.Builder builder, Plugin target) {
1514         XmlNode oldVal = target.getConfiguration();
1515         XmlNode newVal = transform(oldVal);
1516         return newVal != oldVal ? (builder != null ? builder : creator.get()).configuration(newVal) : builder;
1517     }
1518 
1519     protected PluginExecution transformPluginExecution(PluginExecution target) {
1520         if (target == null) {
1521             return null;
1522         }
1523         Supplier<PluginExecution.Builder> creator = () -> PluginExecution.newBuilder(target);
1524         PluginExecution.Builder builder = null;
1525         builder = (PluginExecution.Builder) transformPluginExecution_Id(creator, builder, target);
1526         builder = (PluginExecution.Builder) transformPluginExecution_Phase(creator, builder, target);
1527         builder = (PluginExecution.Builder) transformPluginExecution_Priority(creator, builder, target);
1528         builder = (PluginExecution.Builder) transformPluginExecution_Goals(creator, builder, target);
1529         builder = (PluginExecution.Builder) transformConfigurationContainer_Inherited(creator, builder, target);
1530         builder = (PluginExecution.Builder) transformConfigurationContainer_Configuration(creator, builder, target);
1531         return builder != null ? builder.build() : target;
1532     }
1533 
1534     protected PluginExecution.Builder transformPluginExecution_Id(Supplier<? extends PluginExecution.Builder> creator, PluginExecution.Builder builder, PluginExecution target) {
1535         String oldVal = target.getId();
1536         String newVal = transform(oldVal);
1537         return newVal != oldVal ? (builder != null ? builder : creator.get()).id(newVal) : builder;
1538     }
1539     protected PluginExecution.Builder transformPluginExecution_Phase(Supplier<? extends PluginExecution.Builder> creator, PluginExecution.Builder builder, PluginExecution target) {
1540         String oldVal = target.getPhase();
1541         String newVal = transform(oldVal);
1542         return newVal != oldVal ? (builder != null ? builder : creator.get()).phase(newVal) : builder;
1543     }
1544     protected PluginExecution.Builder transformPluginExecution_Priority(Supplier<? extends PluginExecution.Builder> creator, PluginExecution.Builder builder, PluginExecution target) {
1545         // nothing to do, the transformer only handles strings
1546         return builder;
1547     }
1548     protected PluginExecution.Builder transformPluginExecution_Goals(Supplier<? extends PluginExecution.Builder> creator, PluginExecution.Builder builder, PluginExecution target) {
1549         List<String> oldVal = target.getGoals();
1550         List<String> newVal = transform(oldVal, this::transform);
1551         return newVal != oldVal ? (builder != null ? builder : creator.get()).goals(newVal) : builder;
1552     }
1553     protected PluginExecution.Builder transformPluginExecution_Inherited(Supplier<? extends PluginExecution.Builder> creator, PluginExecution.Builder builder, PluginExecution target) {
1554         String oldVal = target.getInherited();
1555         String newVal = transform(oldVal);
1556         return newVal != oldVal ? (builder != null ? builder : creator.get()).inherited(newVal) : builder;
1557     }
1558     protected PluginExecution.Builder transformPluginExecution_Configuration(Supplier<? extends PluginExecution.Builder> creator, PluginExecution.Builder builder, PluginExecution target) {
1559         XmlNode oldVal = target.getConfiguration();
1560         XmlNode newVal = transform(oldVal);
1561         return newVal != oldVal ? (builder != null ? builder : creator.get()).configuration(newVal) : builder;
1562     }
1563 
1564     protected DependencyManagement transformDependencyManagement(DependencyManagement target) {
1565         if (target == null) {
1566             return null;
1567         }
1568         Supplier<DependencyManagement.Builder> creator = () -> DependencyManagement.newBuilder(target);
1569         DependencyManagement.Builder builder = null;
1570         builder = (DependencyManagement.Builder) transformDependencyManagement_Dependencies(creator, builder, target);
1571         return builder != null ? builder.build() : target;
1572     }
1573 
1574     protected DependencyManagement.Builder transformDependencyManagement_Dependencies(Supplier<? extends DependencyManagement.Builder> creator, DependencyManagement.Builder builder, DependencyManagement target) {
1575         List<Dependency> oldVal = target.getDependencies();
1576         List<Dependency> newVal = transform(oldVal, this::transformDependency);
1577         return newVal != oldVal ? (builder != null ? builder : creator.get()).dependencies(newVal) : builder;
1578     }
1579 
1580     protected PluginManagement transformPluginManagement(PluginManagement target) {
1581         if (target == null) {
1582             return null;
1583         }
1584         Supplier<PluginManagement.Builder> creator = () -> PluginManagement.newBuilder(target);
1585         PluginManagement.Builder builder = null;
1586         builder = (PluginManagement.Builder) transformPluginContainer_Plugins(creator, builder, target);
1587         return builder != null ? builder.build() : target;
1588     }
1589 
1590     protected PluginManagement.Builder transformPluginManagement_Plugins(Supplier<? extends PluginManagement.Builder> creator, PluginManagement.Builder builder, PluginManagement target) {
1591         List<Plugin> oldVal = target.getPlugins();
1592         List<Plugin> newVal = transform(oldVal, this::transformPlugin);
1593         return newVal != oldVal ? (builder != null ? builder : creator.get()).plugins(newVal) : builder;
1594     }
1595 
1596     protected Reporting transformReporting(Reporting target) {
1597         if (target == null) {
1598             return null;
1599         }
1600         Supplier<Reporting.Builder> creator = () -> Reporting.newBuilder(target);
1601         Reporting.Builder builder = null;
1602         builder = (Reporting.Builder) transformReporting_ExcludeDefaults(creator, builder, target);
1603         builder = (Reporting.Builder) transformReporting_OutputDirectory(creator, builder, target);
1604         builder = (Reporting.Builder) transformReporting_Plugins(creator, builder, target);
1605         return builder != null ? builder.build() : target;
1606     }
1607 
1608     protected Reporting.Builder transformReporting_ExcludeDefaults(Supplier<? extends Reporting.Builder> creator, Reporting.Builder builder, Reporting target) {
1609         String oldVal = target.getExcludeDefaults();
1610         String newVal = transform(oldVal);
1611         return newVal != oldVal ? (builder != null ? builder : creator.get()).excludeDefaults(newVal) : builder;
1612     }
1613     protected Reporting.Builder transformReporting_OutputDirectory(Supplier<? extends Reporting.Builder> creator, Reporting.Builder builder, Reporting target) {
1614         String oldVal = target.getOutputDirectory();
1615         String newVal = transform(oldVal);
1616         return newVal != oldVal ? (builder != null ? builder : creator.get()).outputDirectory(newVal) : builder;
1617     }
1618     protected Reporting.Builder transformReporting_Plugins(Supplier<? extends Reporting.Builder> creator, Reporting.Builder builder, Reporting target) {
1619         List<ReportPlugin> oldVal = target.getPlugins();
1620         List<ReportPlugin> newVal = transform(oldVal, this::transformReportPlugin);
1621         return newVal != oldVal ? (builder != null ? builder : creator.get()).plugins(newVal) : builder;
1622     }
1623 
1624     protected Profile transformProfile(Profile target) {
1625         if (target == null) {
1626             return null;
1627         }
1628         Supplier<Profile.Builder> creator = () -> Profile.newBuilder(target);
1629         Profile.Builder builder = null;
1630         builder = (Profile.Builder) transformProfile_Id(creator, builder, target);
1631         builder = (Profile.Builder) transformProfile_Activation(creator, builder, target);
1632         builder = (Profile.Builder) transformProfile_Build(creator, builder, target);
1633         builder = (Profile.Builder) transformModelBase_Modules(creator, builder, target);
1634         builder = (Profile.Builder) transformModelBase_Subprojects(creator, builder, target);
1635         builder = (Profile.Builder) transformModelBase_DistributionManagement(creator, builder, target);
1636         builder = (Profile.Builder) transformModelBase_Properties(creator, builder, target);
1637         builder = (Profile.Builder) transformModelBase_DependencyManagement(creator, builder, target);
1638         builder = (Profile.Builder) transformModelBase_Dependencies(creator, builder, target);
1639         builder = (Profile.Builder) transformModelBase_Repositories(creator, builder, target);
1640         builder = (Profile.Builder) transformModelBase_PluginRepositories(creator, builder, target);
1641         builder = (Profile.Builder) transformModelBase_Reporting(creator, builder, target);
1642         return builder != null ? builder.build() : target;
1643     }
1644 
1645     protected Profile.Builder transformProfile_Id(Supplier<? extends Profile.Builder> creator, Profile.Builder builder, Profile target) {
1646         String oldVal = target.getId();
1647         String newVal = transform(oldVal);
1648         return newVal != oldVal ? (builder != null ? builder : creator.get()).id(newVal) : builder;
1649     }
1650     protected Profile.Builder transformProfile_Activation(Supplier<? extends Profile.Builder> creator, Profile.Builder builder, Profile target) {
1651         Activation oldVal = target.getActivation();
1652         Activation newVal = transformActivation(oldVal);
1653         return newVal != oldVal ? (builder != null ? builder : creator.get()).activation(newVal) : builder;
1654     }
1655     protected Profile.Builder transformProfile_Build(Supplier<? extends Profile.Builder> creator, Profile.Builder builder, Profile target) {
1656         BuildBase oldVal = target.getBuild();
1657         BuildBase newVal = transformBuildBase(oldVal);
1658         return newVal != oldVal ? (builder != null ? builder : creator.get()).build(newVal) : builder;
1659     }
1660     protected Profile.Builder transformProfile_Modules(Supplier<? extends Profile.Builder> creator, Profile.Builder builder, Profile target) {
1661         List<String> oldVal = target.getModules();
1662         List<String> newVal = transform(oldVal, this::transform);
1663         return newVal != oldVal ? (builder != null ? builder : creator.get()).modules(newVal) : builder;
1664     }
1665     protected Profile.Builder transformProfile_Subprojects(Supplier<? extends Profile.Builder> creator, Profile.Builder builder, Profile target) {
1666         List<String> oldVal = target.getSubprojects();
1667         List<String> newVal = transform(oldVal, this::transform);
1668         return newVal != oldVal ? (builder != null ? builder : creator.get()).subprojects(newVal) : builder;
1669     }
1670     protected Profile.Builder transformProfile_DistributionManagement(Supplier<? extends Profile.Builder> creator, Profile.Builder builder, Profile target) {
1671         DistributionManagement oldVal = target.getDistributionManagement();
1672         DistributionManagement newVal = transformDistributionManagement(oldVal);
1673         return newVal != oldVal ? (builder != null ? builder : creator.get()).distributionManagement(newVal) : builder;
1674     }
1675     protected Profile.Builder transformProfile_Properties(Supplier<? extends Profile.Builder> creator, Profile.Builder builder, Profile target) {
1676         Map<String, String> props = target.getProperties();
1677         Map<String, String> newProps = null;
1678         for (Map.Entry<String, String> entry : props.entrySet()) {
1679             String newVal = transform(entry.getValue());
1680             if (newVal != null && newVal != entry.getValue()) {
1681                 if (newProps == null) {
1682                     newProps = new HashMap<>();
1683                     newProps.putAll(props);
1684                     builder = builder != null ? builder : creator.get();
1685                     builder.properties(newProps);
1686                 }
1687                 newProps.put(entry.getKey(), newVal);
1688             }
1689         }
1690         return builder;
1691     }
1692     protected Profile.Builder transformProfile_DependencyManagement(Supplier<? extends Profile.Builder> creator, Profile.Builder builder, Profile target) {
1693         DependencyManagement oldVal = target.getDependencyManagement();
1694         DependencyManagement newVal = transformDependencyManagement(oldVal);
1695         return newVal != oldVal ? (builder != null ? builder : creator.get()).dependencyManagement(newVal) : builder;
1696     }
1697     protected Profile.Builder transformProfile_Dependencies(Supplier<? extends Profile.Builder> creator, Profile.Builder builder, Profile target) {
1698         List<Dependency> oldVal = target.getDependencies();
1699         List<Dependency> newVal = transform(oldVal, this::transformDependency);
1700         return newVal != oldVal ? (builder != null ? builder : creator.get()).dependencies(newVal) : builder;
1701     }
1702     protected Profile.Builder transformProfile_Repositories(Supplier<? extends Profile.Builder> creator, Profile.Builder builder, Profile target) {
1703         List<Repository> oldVal = target.getRepositories();
1704         List<Repository> newVal = transform(oldVal, this::transformRepository);
1705         return newVal != oldVal ? (builder != null ? builder : creator.get()).repositories(newVal) : builder;
1706     }
1707     protected Profile.Builder transformProfile_PluginRepositories(Supplier<? extends Profile.Builder> creator, Profile.Builder builder, Profile target) {
1708         List<Repository> oldVal = target.getPluginRepositories();
1709         List<Repository> newVal = transform(oldVal, this::transformRepository);
1710         return newVal != oldVal ? (builder != null ? builder : creator.get()).pluginRepositories(newVal) : builder;
1711     }
1712     protected Profile.Builder transformProfile_Reporting(Supplier<? extends Profile.Builder> creator, Profile.Builder builder, Profile target) {
1713         Reporting oldVal = target.getReporting();
1714         Reporting newVal = transformReporting(oldVal);
1715         return newVal != oldVal ? (builder != null ? builder : creator.get()).reporting(newVal) : builder;
1716     }
1717 
1718     protected Activation transformActivation(Activation target) {
1719         if (target == null) {
1720             return null;
1721         }
1722         Supplier<Activation.Builder> creator = () -> Activation.newBuilder(target);
1723         Activation.Builder builder = null;
1724         builder = (Activation.Builder) transformActivation_ActiveByDefault(creator, builder, target);
1725         builder = (Activation.Builder) transformActivation_Jdk(creator, builder, target);
1726         builder = (Activation.Builder) transformActivation_Os(creator, builder, target);
1727         builder = (Activation.Builder) transformActivation_Property(creator, builder, target);
1728         builder = (Activation.Builder) transformActivation_File(creator, builder, target);
1729         builder = (Activation.Builder) transformActivation_Packaging(creator, builder, target);
1730         return builder != null ? builder.build() : target;
1731     }
1732 
1733     protected Activation.Builder transformActivation_ActiveByDefault(Supplier<? extends Activation.Builder> creator, Activation.Builder builder, Activation target) {
1734         // nothing to do, the transformer only handles strings
1735         return builder;
1736     }
1737     protected Activation.Builder transformActivation_Jdk(Supplier<? extends Activation.Builder> creator, Activation.Builder builder, Activation target) {
1738         String oldVal = target.getJdk();
1739         String newVal = transform(oldVal);
1740         return newVal != oldVal ? (builder != null ? builder : creator.get()).jdk(newVal) : builder;
1741     }
1742     protected Activation.Builder transformActivation_Os(Supplier<? extends Activation.Builder> creator, Activation.Builder builder, Activation target) {
1743         ActivationOS oldVal = target.getOs();
1744         ActivationOS newVal = transformActivationOS(oldVal);
1745         return newVal != oldVal ? (builder != null ? builder : creator.get()).os(newVal) : builder;
1746     }
1747     protected Activation.Builder transformActivation_Property(Supplier<? extends Activation.Builder> creator, Activation.Builder builder, Activation target) {
1748         ActivationProperty oldVal = target.getProperty();
1749         ActivationProperty newVal = transformActivationProperty(oldVal);
1750         return newVal != oldVal ? (builder != null ? builder : creator.get()).property(newVal) : builder;
1751     }
1752     protected Activation.Builder transformActivation_File(Supplier<? extends Activation.Builder> creator, Activation.Builder builder, Activation target) {
1753         ActivationFile oldVal = target.getFile();
1754         ActivationFile newVal = transformActivationFile(oldVal);
1755         return newVal != oldVal ? (builder != null ? builder : creator.get()).file(newVal) : builder;
1756     }
1757     protected Activation.Builder transformActivation_Packaging(Supplier<? extends Activation.Builder> creator, Activation.Builder builder, Activation target) {
1758         String oldVal = target.getPackaging();
1759         String newVal = transform(oldVal);
1760         return newVal != oldVal ? (builder != null ? builder : creator.get()).packaging(newVal) : builder;
1761     }
1762 
1763     protected ActivationProperty transformActivationProperty(ActivationProperty target) {
1764         if (target == null) {
1765             return null;
1766         }
1767         Supplier<ActivationProperty.Builder> creator = () -> ActivationProperty.newBuilder(target);
1768         ActivationProperty.Builder builder = null;
1769         builder = (ActivationProperty.Builder) transformActivationProperty_Name(creator, builder, target);
1770         builder = (ActivationProperty.Builder) transformActivationProperty_Value(creator, builder, target);
1771         return builder != null ? builder.build() : target;
1772     }
1773 
1774     protected ActivationProperty.Builder transformActivationProperty_Name(Supplier<? extends ActivationProperty.Builder> creator, ActivationProperty.Builder builder, ActivationProperty target) {
1775         String oldVal = target.getName();
1776         String newVal = transform(oldVal);
1777         return newVal != oldVal ? (builder != null ? builder : creator.get()).name(newVal) : builder;
1778     }
1779     protected ActivationProperty.Builder transformActivationProperty_Value(Supplier<? extends ActivationProperty.Builder> creator, ActivationProperty.Builder builder, ActivationProperty target) {
1780         String oldVal = target.getValue();
1781         String newVal = transform(oldVal);
1782         return newVal != oldVal ? (builder != null ? builder : creator.get()).value(newVal) : builder;
1783     }
1784 
1785     protected ActivationOS transformActivationOS(ActivationOS target) {
1786         if (target == null) {
1787             return null;
1788         }
1789         Supplier<ActivationOS.Builder> creator = () -> ActivationOS.newBuilder(target);
1790         ActivationOS.Builder builder = null;
1791         builder = (ActivationOS.Builder) transformActivationOS_Name(creator, builder, target);
1792         builder = (ActivationOS.Builder) transformActivationOS_Family(creator, builder, target);
1793         builder = (ActivationOS.Builder) transformActivationOS_Arch(creator, builder, target);
1794         builder = (ActivationOS.Builder) transformActivationOS_Version(creator, builder, target);
1795         return builder != null ? builder.build() : target;
1796     }
1797 
1798     protected ActivationOS.Builder transformActivationOS_Name(Supplier<? extends ActivationOS.Builder> creator, ActivationOS.Builder builder, ActivationOS target) {
1799         String oldVal = target.getName();
1800         String newVal = transform(oldVal);
1801         return newVal != oldVal ? (builder != null ? builder : creator.get()).name(newVal) : builder;
1802     }
1803     protected ActivationOS.Builder transformActivationOS_Family(Supplier<? extends ActivationOS.Builder> creator, ActivationOS.Builder builder, ActivationOS target) {
1804         String oldVal = target.getFamily();
1805         String newVal = transform(oldVal);
1806         return newVal != oldVal ? (builder != null ? builder : creator.get()).family(newVal) : builder;
1807     }
1808     protected ActivationOS.Builder transformActivationOS_Arch(Supplier<? extends ActivationOS.Builder> creator, ActivationOS.Builder builder, ActivationOS target) {
1809         String oldVal = target.getArch();
1810         String newVal = transform(oldVal);
1811         return newVal != oldVal ? (builder != null ? builder : creator.get()).arch(newVal) : builder;
1812     }
1813     protected ActivationOS.Builder transformActivationOS_Version(Supplier<? extends ActivationOS.Builder> creator, ActivationOS.Builder builder, ActivationOS target) {
1814         String oldVal = target.getVersion();
1815         String newVal = transform(oldVal);
1816         return newVal != oldVal ? (builder != null ? builder : creator.get()).version(newVal) : builder;
1817     }
1818 
1819     protected ActivationFile transformActivationFile(ActivationFile target) {
1820         if (target == null) {
1821             return null;
1822         }
1823         Supplier<ActivationFile.Builder> creator = () -> ActivationFile.newBuilder(target);
1824         ActivationFile.Builder builder = null;
1825         builder = (ActivationFile.Builder) transformActivationFile_Missing(creator, builder, target);
1826         builder = (ActivationFile.Builder) transformActivationFile_Exists(creator, builder, target);
1827         return builder != null ? builder.build() : target;
1828     }
1829 
1830     protected ActivationFile.Builder transformActivationFile_Missing(Supplier<? extends ActivationFile.Builder> creator, ActivationFile.Builder builder, ActivationFile target) {
1831         String oldVal = target.getMissing();
1832         String newVal = transform(oldVal);
1833         return newVal != oldVal ? (builder != null ? builder : creator.get()).missing(newVal) : builder;
1834     }
1835     protected ActivationFile.Builder transformActivationFile_Exists(Supplier<? extends ActivationFile.Builder> creator, ActivationFile.Builder builder, ActivationFile target) {
1836         String oldVal = target.getExists();
1837         String newVal = transform(oldVal);
1838         return newVal != oldVal ? (builder != null ? builder : creator.get()).exists(newVal) : builder;
1839     }
1840 
1841     protected ReportPlugin transformReportPlugin(ReportPlugin target) {
1842         if (target == null) {
1843             return null;
1844         }
1845         Supplier<ReportPlugin.Builder> creator = () -> ReportPlugin.newBuilder(target);
1846         ReportPlugin.Builder builder = null;
1847         builder = (ReportPlugin.Builder) transformReportPlugin_GroupId(creator, builder, target);
1848         builder = (ReportPlugin.Builder) transformReportPlugin_ArtifactId(creator, builder, target);
1849         builder = (ReportPlugin.Builder) transformReportPlugin_Version(creator, builder, target);
1850         builder = (ReportPlugin.Builder) transformReportPlugin_ReportSets(creator, builder, target);
1851         builder = (ReportPlugin.Builder) transformConfigurationContainer_Inherited(creator, builder, target);
1852         builder = (ReportPlugin.Builder) transformConfigurationContainer_Configuration(creator, builder, target);
1853         return builder != null ? builder.build() : target;
1854     }
1855 
1856     protected ReportPlugin.Builder transformReportPlugin_GroupId(Supplier<? extends ReportPlugin.Builder> creator, ReportPlugin.Builder builder, ReportPlugin target) {
1857         String oldVal = target.getGroupId();
1858         String newVal = transform(oldVal);
1859         return newVal != oldVal ? (builder != null ? builder : creator.get()).groupId(newVal) : builder;
1860     }
1861     protected ReportPlugin.Builder transformReportPlugin_ArtifactId(Supplier<? extends ReportPlugin.Builder> creator, ReportPlugin.Builder builder, ReportPlugin target) {
1862         String oldVal = target.getArtifactId();
1863         String newVal = transform(oldVal);
1864         return newVal != oldVal ? (builder != null ? builder : creator.get()).artifactId(newVal) : builder;
1865     }
1866     protected ReportPlugin.Builder transformReportPlugin_Version(Supplier<? extends ReportPlugin.Builder> creator, ReportPlugin.Builder builder, ReportPlugin target) {
1867         String oldVal = target.getVersion();
1868         String newVal = transform(oldVal);
1869         return newVal != oldVal ? (builder != null ? builder : creator.get()).version(newVal) : builder;
1870     }
1871     protected ReportPlugin.Builder transformReportPlugin_ReportSets(Supplier<? extends ReportPlugin.Builder> creator, ReportPlugin.Builder builder, ReportPlugin target) {
1872         List<ReportSet> oldVal = target.getReportSets();
1873         List<ReportSet> newVal = transform(oldVal, this::transformReportSet);
1874         return newVal != oldVal ? (builder != null ? builder : creator.get()).reportSets(newVal) : builder;
1875     }
1876     protected ReportPlugin.Builder transformReportPlugin_Inherited(Supplier<? extends ReportPlugin.Builder> creator, ReportPlugin.Builder builder, ReportPlugin target) {
1877         String oldVal = target.getInherited();
1878         String newVal = transform(oldVal);
1879         return newVal != oldVal ? (builder != null ? builder : creator.get()).inherited(newVal) : builder;
1880     }
1881     protected ReportPlugin.Builder transformReportPlugin_Configuration(Supplier<? extends ReportPlugin.Builder> creator, ReportPlugin.Builder builder, ReportPlugin target) {
1882         XmlNode oldVal = target.getConfiguration();
1883         XmlNode newVal = transform(oldVal);
1884         return newVal != oldVal ? (builder != null ? builder : creator.get()).configuration(newVal) : builder;
1885     }
1886 
1887     protected ReportSet transformReportSet(ReportSet target) {
1888         if (target == null) {
1889             return null;
1890         }
1891         Supplier<ReportSet.Builder> creator = () -> ReportSet.newBuilder(target);
1892         ReportSet.Builder builder = null;
1893         builder = (ReportSet.Builder) transformReportSet_Id(creator, builder, target);
1894         builder = (ReportSet.Builder) transformReportSet_Reports(creator, builder, target);
1895         builder = (ReportSet.Builder) transformConfigurationContainer_Inherited(creator, builder, target);
1896         builder = (ReportSet.Builder) transformConfigurationContainer_Configuration(creator, builder, target);
1897         return builder != null ? builder.build() : target;
1898     }
1899 
1900     protected ReportSet.Builder transformReportSet_Id(Supplier<? extends ReportSet.Builder> creator, ReportSet.Builder builder, ReportSet target) {
1901         String oldVal = target.getId();
1902         String newVal = transform(oldVal);
1903         return newVal != oldVal ? (builder != null ? builder : creator.get()).id(newVal) : builder;
1904     }
1905     protected ReportSet.Builder transformReportSet_Reports(Supplier<? extends ReportSet.Builder> creator, ReportSet.Builder builder, ReportSet target) {
1906         List<String> oldVal = target.getReports();
1907         List<String> newVal = transform(oldVal, this::transform);
1908         return newVal != oldVal ? (builder != null ? builder : creator.get()).reports(newVal) : builder;
1909     }
1910     protected ReportSet.Builder transformReportSet_Inherited(Supplier<? extends ReportSet.Builder> creator, ReportSet.Builder builder, ReportSet target) {
1911         String oldVal = target.getInherited();
1912         String newVal = transform(oldVal);
1913         return newVal != oldVal ? (builder != null ? builder : creator.get()).inherited(newVal) : builder;
1914     }
1915     protected ReportSet.Builder transformReportSet_Configuration(Supplier<? extends ReportSet.Builder> creator, ReportSet.Builder builder, ReportSet target) {
1916         XmlNode oldVal = target.getConfiguration();
1917         XmlNode newVal = transform(oldVal);
1918         return newVal != oldVal ? (builder != null ? builder : creator.get()).configuration(newVal) : builder;
1919     }
1920 
1921     protected Prerequisites transformPrerequisites(Prerequisites target) {
1922         if (target == null) {
1923             return null;
1924         }
1925         Supplier<Prerequisites.Builder> creator = () -> Prerequisites.newBuilder(target);
1926         Prerequisites.Builder builder = null;
1927         builder = (Prerequisites.Builder) transformPrerequisites_Maven(creator, builder, target);
1928         return builder != null ? builder.build() : target;
1929     }
1930 
1931     protected Prerequisites.Builder transformPrerequisites_Maven(Supplier<? extends Prerequisites.Builder> creator, Prerequisites.Builder builder, Prerequisites target) {
1932         String oldVal = target.getMaven();
1933         String newVal = transform(oldVal);
1934         return newVal != oldVal ? (builder != null ? builder : creator.get()).maven(newVal) : builder;
1935     }
1936 
1937     protected Relocation transformRelocation(Relocation target) {
1938         if (target == null) {
1939             return null;
1940         }
1941         Supplier<Relocation.Builder> creator = () -> Relocation.newBuilder(target);
1942         Relocation.Builder builder = null;
1943         builder = (Relocation.Builder) transformRelocation_GroupId(creator, builder, target);
1944         builder = (Relocation.Builder) transformRelocation_ArtifactId(creator, builder, target);
1945         builder = (Relocation.Builder) transformRelocation_Version(creator, builder, target);
1946         builder = (Relocation.Builder) transformRelocation_Message(creator, builder, target);
1947         return builder != null ? builder.build() : target;
1948     }
1949 
1950     protected Relocation.Builder transformRelocation_GroupId(Supplier<? extends Relocation.Builder> creator, Relocation.Builder builder, Relocation target) {
1951         String oldVal = target.getGroupId();
1952         String newVal = transform(oldVal);
1953         return newVal != oldVal ? (builder != null ? builder : creator.get()).groupId(newVal) : builder;
1954     }
1955     protected Relocation.Builder transformRelocation_ArtifactId(Supplier<? extends Relocation.Builder> creator, Relocation.Builder builder, Relocation target) {
1956         String oldVal = target.getArtifactId();
1957         String newVal = transform(oldVal);
1958         return newVal != oldVal ? (builder != null ? builder : creator.get()).artifactId(newVal) : builder;
1959     }
1960     protected Relocation.Builder transformRelocation_Version(Supplier<? extends Relocation.Builder> creator, Relocation.Builder builder, Relocation target) {
1961         String oldVal = target.getVersion();
1962         String newVal = transform(oldVal);
1963         return newVal != oldVal ? (builder != null ? builder : creator.get()).version(newVal) : builder;
1964     }
1965     protected Relocation.Builder transformRelocation_Message(Supplier<? extends Relocation.Builder> creator, Relocation.Builder builder, Relocation target) {
1966         String oldVal = target.getMessage();
1967         String newVal = transform(oldVal);
1968         return newVal != oldVal ? (builder != null ? builder : creator.get()).message(newVal) : builder;
1969     }
1970 
1971     protected Extension transformExtension(Extension target) {
1972         if (target == null) {
1973             return null;
1974         }
1975         Supplier<Extension.Builder> creator = () -> Extension.newBuilder(target);
1976         Extension.Builder builder = null;
1977         builder = (Extension.Builder) transformExtension_GroupId(creator, builder, target);
1978         builder = (Extension.Builder) transformExtension_ArtifactId(creator, builder, target);
1979         builder = (Extension.Builder) transformExtension_Version(creator, builder, target);
1980         builder = (Extension.Builder) transformExtension_Configuration(creator, builder, target);
1981         return builder != null ? builder.build() : target;
1982     }
1983 
1984     protected Extension.Builder transformExtension_GroupId(Supplier<? extends Extension.Builder> creator, Extension.Builder builder, Extension target) {
1985         String oldVal = target.getGroupId();
1986         String newVal = transform(oldVal);
1987         return newVal != oldVal ? (builder != null ? builder : creator.get()).groupId(newVal) : builder;
1988     }
1989     protected Extension.Builder transformExtension_ArtifactId(Supplier<? extends Extension.Builder> creator, Extension.Builder builder, Extension target) {
1990         String oldVal = target.getArtifactId();
1991         String newVal = transform(oldVal);
1992         return newVal != oldVal ? (builder != null ? builder : creator.get()).artifactId(newVal) : builder;
1993     }
1994     protected Extension.Builder transformExtension_Version(Supplier<? extends Extension.Builder> creator, Extension.Builder builder, Extension target) {
1995         String oldVal = target.getVersion();
1996         String newVal = transform(oldVal);
1997         return newVal != oldVal ? (builder != null ? builder : creator.get()).version(newVal) : builder;
1998     }
1999     protected Extension.Builder transformExtension_Configuration(Supplier<? extends Extension.Builder> creator, Extension.Builder builder, Extension target) {
2000         XmlNode oldVal = target.getConfiguration();
2001         XmlNode newVal = transform(oldVal);
2002         return newVal != oldVal ? (builder != null ? builder : creator.get()).configuration(newVal) : builder;
2003     }
2004 
2005     protected <T> List<T> transform(List<T> list, Function<T, T> transformer) {
2006         List<T> newList = list;
2007         for (int i = 0; i < list.size(); i++) {
2008             T oldVal = list.get(i);
2009             T newVal = transformer.apply(oldVal);
2010             if (newVal != oldVal) {
2011                 if (newList == list) {
2012                     newList = new ArrayList<>(list);
2013                 }
2014                 newList.set(i, newVal);
2015             }
2016         }
2017         return newList;
2018     }
2019 
2020     protected <T> Map<String, T> transform(Map<String, T> map, Function<T, T> transformer) {
2021         Map<String, T> newMap = map;
2022         for (String key : map.keySet()) {
2023             T oldVal = map.get(key);
2024             T newVal = transformer.apply(oldVal);
2025             if (newVal != oldVal) {
2026                 if (newMap == map) {
2027                     newMap = new HashMap<>(map);
2028                 }
2029                 newMap.put(key, newVal);
2030             }
2031         }
2032         return newMap;
2033     }
2034 
2035     protected XmlNode transform(XmlNode node) {
2036         if (node != null) {
2037             String oldValue = node.getValue();
2038             String newValue = transform(oldValue);
2039             Map<String, String> oldAttrs = node.getAttributes();
2040             Map<String, String> newAttrs = transform(oldAttrs, this::transform);
2041             List<XmlNode> oldChildren = node.getChildren();
2042             List<XmlNode> newChildren = transform(oldChildren, this::transform);
2043             if (oldValue != newValue || oldAttrs != newAttrs || oldChildren != newChildren) {
2044                 return new XmlNodeImpl(node.getPrefix(), node.getNamespaceUri(), node.getName(),
2045                         newValue, newAttrs, newChildren, node.getInputLocation());
2046             }
2047         }
2048         return node;
2049     }
2050 }