Class DefaultModelBuilderResult

java.lang.Object
org.apache.maven.internal.impl.model.DefaultModelBuilderResult
All Implemented Interfaces:
ModelBuilderResult

class DefaultModelBuilderResult extends Object implements ModelBuilderResult
Collects the output of the model builder.
  • Field Details

  • Constructor Details

    • DefaultModelBuilderResult

      DefaultModelBuilderResult()
    • DefaultModelBuilderResult

      DefaultModelBuilderResult(DefaultModelBuilderResult problemHolder)
  • Method Details

    • getSource

      public ModelSource getSource()
      Description copied from interface: ModelBuilderResult
      Gets the source from which the model was read.
      Specified by:
      getSource in interface ModelBuilderResult
      Returns:
      The source from which the model was read, never null.
    • setSource

      public void setSource(ModelSource source)
    • getFileModel

      public Model getFileModel()
      Description copied from interface: ModelBuilderResult
      Gets the file model.
      Specified by:
      getFileModel in interface ModelBuilderResult
      Returns:
      the file model, never null.
    • setFileModel

      public void setFileModel(Model fileModel)
    • getRawModel

      public Model getRawModel()
      Description copied from interface: ModelBuilderResult
      Gets the file model + build pom transformation, without inheritance nor interpolation.
      Specified by:
      getRawModel in interface ModelBuilderResult
      Returns:
      The raw model, never null.
    • setRawModel

      public void setRawModel(Model rawModel)
    • getParentModel

      public Model getParentModel()
      Description copied from interface: ModelBuilderResult
      Gets the effective model of the parent POM.
      Specified by:
      getParentModel in interface ModelBuilderResult
      Returns:
      the effective model of the parent POM, never null
    • setParentModel

      public void setParentModel(Model parentModel)
    • getEffectiveModel

      public Model getEffectiveModel()
      Description copied from interface: ModelBuilderResult
      Gets the assembled model with inheritance, interpolation and profile injection.
      Specified by:
      getEffectiveModel in interface ModelBuilderResult
      Returns:
      The assembled model, never null.
    • setEffectiveModel

      public void setEffectiveModel(Model model)
    • getActivePomProfiles

      public List<Profile> getActivePomProfiles()
      Description copied from interface: ModelBuilderResult
      Gets the profiles that were active during model building.
      Specified by:
      getActivePomProfiles in interface ModelBuilderResult
      Returns:
      The active profiles of the model or an empty list if the model has no active profiles.
    • setActivePomProfiles

      public void setActivePomProfiles(List<Profile> activeProfiles)
    • getActiveExternalProfiles

      public List<Profile> getActiveExternalProfiles()
      Description copied from interface: ModelBuilderResult
      Gets the external profiles that were active during model building. External profiles are those that were contributed by ModelBuilderRequest.getProfiles().
      Specified by:
      getActiveExternalProfiles in interface ModelBuilderResult
      Returns:
      The active external profiles or an empty list if none, never null.
    • setActiveExternalProfiles

      public void setActiveExternalProfiles(List<Profile> activeProfiles)
    • getProblems

      public List<ModelProblem> getProblems()
      Returns an unmodifiable list of problems encountered during the model building process.
      Specified by:
      getProblems in interface ModelBuilderResult
      Returns:
      a list of ModelProblem instances representing the encountered problems, guaranteed to be non-null but possibly empty.
    • addProblem

      public void addProblem(ModelProblem problem)
      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

      public List<DefaultModelBuilderResult> getChildren()
      Description copied from interface: ModelBuilderResult
      Gets the children of this result.
      Specified by:
      getChildren in interface ModelBuilderResult
      Returns:
      the children of this result, can be empty but never null
    • toString

      public String toString()
      Description copied from interface: ModelBuilderResult
      Creates a human-readable representation of these errors.
      Specified by:
      toString in interface ModelBuilderResult
      Overrides:
      toString in class Object