Class DefaultModelBuilderResult
java.lang.Object
org.apache.maven.internal.impl.model.DefaultModelBuilderResult
- All Implemented Interfaces:
ModelBuilderResult
Collects the output of the model builder.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<DefaultModelBuilderResult> private Modelprivate Modelprivate Modelprivate final DefaultModelBuilderResultprivate final List<ModelProblem> private Modelprivate ModelSource -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddProblem(ModelProblem problem) Adds a given problem to the list of problems and propagates it to the parent result if present.Gets the external profiles that were active during model building.Gets the profiles that were active during model building.Gets the children of this result.Gets the assembled model with inheritance, interpolation and profile injection.Gets the file model.Gets the effective model of the parent POM.Returns an unmodifiable list of problems encountered during the model building process.Gets the file model + build pom transformation, without inheritance nor interpolation.Gets the source from which the model was read.voidsetActiveExternalProfiles(List<Profile> activeProfiles) voidsetActivePomProfiles(List<Profile> activeProfiles) voidsetEffectiveModel(Model model) voidsetFileModel(Model fileModel) voidsetParentModel(Model parentModel) voidsetRawModel(Model rawModel) voidsetSource(ModelSource source) toString()Creates a human-readable representation of these errors.
-
Field Details
-
source
-
fileModel
-
rawModel
-
parentModel
-
effectiveModel
-
activePomProfiles
-
activeExternalProfiles
-
problems
-
problemHolder
-
children
-
-
Constructor Details
-
DefaultModelBuilderResult
DefaultModelBuilderResult() -
DefaultModelBuilderResult
DefaultModelBuilderResult(DefaultModelBuilderResult problemHolder)
-
-
Method Details
-
getSource
Description copied from interface:ModelBuilderResultGets the source from which the model was read.- Specified by:
getSourcein interfaceModelBuilderResult- Returns:
- The source from which the model was read, never
null.
-
setSource
-
getFileModel
Description copied from interface:ModelBuilderResultGets the file model.- Specified by:
getFileModelin interfaceModelBuilderResult- Returns:
- the file model, never
null.
-
setFileModel
-
getRawModel
Description copied from interface:ModelBuilderResultGets the file model + build pom transformation, without inheritance nor interpolation.- Specified by:
getRawModelin interfaceModelBuilderResult- Returns:
- The raw model, never
null.
-
setRawModel
-
getParentModel
Description copied from interface:ModelBuilderResultGets the effective model of the parent POM.- Specified by:
getParentModelin interfaceModelBuilderResult- Returns:
- the effective model of the parent POM, never
null
-
setParentModel
-
getEffectiveModel
Description copied from interface:ModelBuilderResultGets the assembled model with inheritance, interpolation and profile injection.- Specified by:
getEffectiveModelin interfaceModelBuilderResult- Returns:
- The assembled model, never
null.
-
setEffectiveModel
-
getActivePomProfiles
Description copied from interface:ModelBuilderResultGets the profiles that were active during model building.- Specified by:
getActivePomProfilesin interfaceModelBuilderResult- Returns:
- The active profiles of the model or an empty list if the model has no active profiles.
-
setActivePomProfiles
-
getActiveExternalProfiles
Description copied from interface:ModelBuilderResultGets the external profiles that were active during model building. External profiles are those that were contributed byModelBuilderRequest.getProfiles().- Specified by:
getActiveExternalProfilesin interfaceModelBuilderResult- Returns:
- The active external profiles or an empty list if none, never
null.
-
setActiveExternalProfiles
-
getProblems
Returns an unmodifiable list of problems encountered during the model building process.- Specified by:
getProblemsin interfaceModelBuilderResult- Returns:
- a list of ModelProblem instances representing the encountered problems, guaranteed to be non-null but possibly empty.
-
addProblem
Adds a given problem to the list of problems and propagates it to the parent result if present.- Parameters:
problem- The problem to be added. It must be an instance of ModelProblem.
-
getChildren
Description copied from interface:ModelBuilderResultGets the children of this result.- Specified by:
getChildrenin interfaceModelBuilderResult- Returns:
- the children of this result, can be empty but never
null
-
toString
Description copied from interface:ModelBuilderResultCreates a human-readable representation of these errors.- Specified by:
toStringin interfaceModelBuilderResult- Overrides:
toStringin classObject
-