Class DefaultToolchain

  • All Implemented Interfaces:
    Toolchain, ToolchainPrivate
    Direct Known Subclasses:
    DefaultJavaToolChain

    public abstract class DefaultToolchain
    extends java.lang.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 Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String KEY_TYPE  
    • Constructor Detail

      • 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,
                                   java.lang.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 Detail

      • getType

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

        public final void addProvideToken​(java.lang.String type,
                                          RequirementMatcher matcher)
      • matchesRequirements

        public boolean matchesRequirements​(java.util.Map<java.lang.String,​java.lang.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​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object