Class DefaultToolchain

java.lang.Object
org.apache.maven.toolchain.DefaultToolchain
All Implemented Interfaces:
Toolchain, ToolchainPrivate
Direct Known Subclasses:
JavaToolchainImpl

public abstract class DefaultToolchain extends Object implements Toolchain, ToolchainPrivate
Default abstract toolchain implementation, to be used as base class for any toolchain implementation to avoid rewriting usual code.
Since:
2.0.9
Author:
mkleint
  • Field Details

  • Constructor Details

    • DefaultToolchain

      protected DefaultToolchain(ToolchainModel model, org.codehaus.plexus.logging.Logger logger)
      Parameters:
      model - the model, must not be null
      logger - the logger, must not be null
    • DefaultToolchain

      protected DefaultToolchain(ToolchainModel model, String type, org.codehaus.plexus.logging.Logger logger)
      Parameters:
      model - the model, must not be null
      type - the type
      logger - the logger, must not be null
  • Method Details

    • getType

      public final String getType()
      Description copied from interface: Toolchain
      get the type of toolchain.
      Specified by:
      getType in interface Toolchain
      Returns:
      the toolchain type
    • getModel

      public final ToolchainModel getModel()
      Specified by:
      getModel in interface ToolchainPrivate
      Returns:
      the original model wrapped by this interface
    • addProvideToken

      public final void addProvideToken(String type, RequirementMatcher matcher)
    • matchesRequirements

      public boolean matchesRequirements(Map<String,String> requirements)
      Description copied from interface: ToolchainPrivate
      Let the toolchain decide if it matches requirements defined in the toolchain plugin configuration.
      Specified by:
      matchesRequirements in interface ToolchainPrivate
      Parameters:
      requirements - Map<String, String> key value pair, may not be null
      Returns:
      true if the requirements match, otherwise false
    • getLog

      protected org.codehaus.plexus.logging.Logger getLog()
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object