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 Model
private Model
private Model
private final DefaultModelBuilderResult
private final List
<ModelProblem> private Model
private ModelSource
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addProblem
(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.void
setActiveExternalProfiles
(List<Profile> activeProfiles) void
setActivePomProfiles
(List<Profile> activeProfiles) void
setEffectiveModel
(Model model) void
setFileModel
(Model fileModel) void
setParentModel
(Model parentModel) void
setRawModel
(Model rawModel) void
setSource
(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:ModelBuilderResult
Gets the source from which the model was read.- Specified by:
getSource
in interfaceModelBuilderResult
- Returns:
- The source from which the model was read, never
null
.
-
setSource
-
getFileModel
Description copied from interface:ModelBuilderResult
Gets the file model.- Specified by:
getFileModel
in interfaceModelBuilderResult
- Returns:
- the file model, never
null
.
-
setFileModel
-
getRawModel
Description copied from interface:ModelBuilderResult
Gets the file model + build pom transformation, without inheritance nor interpolation.- Specified by:
getRawModel
in interfaceModelBuilderResult
- Returns:
- The raw model, never
null
.
-
setRawModel
-
getParentModel
Description copied from interface:ModelBuilderResult
Gets the effective model of the parent POM.- Specified by:
getParentModel
in interfaceModelBuilderResult
- Returns:
- the effective model of the parent POM, never
null
-
setParentModel
-
getEffectiveModel
Description copied from interface:ModelBuilderResult
Gets the assembled model with inheritance, interpolation and profile injection.- Specified by:
getEffectiveModel
in interfaceModelBuilderResult
- Returns:
- The assembled model, never
null
.
-
setEffectiveModel
-
getActivePomProfiles
Description copied from interface:ModelBuilderResult
Gets the profiles that were active during model building.- Specified by:
getActivePomProfiles
in 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:ModelBuilderResult
Gets the external profiles that were active during model building. External profiles are those that were contributed byModelBuilderRequest.getProfiles()
.- Specified by:
getActiveExternalProfiles
in 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:
getProblems
in 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:ModelBuilderResult
Gets the children of this result.- Specified by:
getChildren
in interfaceModelBuilderResult
- Returns:
- the children of this result, can be empty but never
null
-
toString
Description copied from interface:ModelBuilderResult
Creates a human-readable representation of these errors.- Specified by:
toString
in interfaceModelBuilderResult
- Overrides:
toString
in classObject
-