Package org.apache.maven.toolchain
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
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DefaultToolchain(ToolchainModel model, String type, org.codehaus.plexus.logging.Logger logger)
protected
DefaultToolchain(ToolchainModel model, org.codehaus.plexus.logging.Logger logger)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addProvideToken(String type, RequirementMatcher matcher)
boolean
equals(Object obj)
protected org.codehaus.plexus.logging.Logger
getLog()
ToolchainModel
getModel()
String
getType()
get the type of toolchain.int
hashCode()
boolean
matchesRequirements(Map<String,String> requirements)
Let the toolchain decide if it matches requirements defined in the toolchain plugin configuration.String
toString()
-
-
-
Field Detail
-
KEY_TYPE
public static final String KEY_TYPE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DefaultToolchain
protected DefaultToolchain(ToolchainModel model, org.codehaus.plexus.logging.Logger logger)
- Parameters:
model
- the model, must not benull
logger
- the logger, must not benull
-
DefaultToolchain
protected DefaultToolchain(ToolchainModel model, String type, org.codehaus.plexus.logging.Logger logger)
- Parameters:
model
- the model, must not benull
type
- the typelogger
- the logger, must not benull
-
-
Method Detail
-
getType
public final String getType()
Description copied from interface:Toolchain
get the type of toolchain.
-
getModel
public final ToolchainModel getModel()
- Specified by:
getModel
in interfaceToolchainPrivate
- 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 interfaceToolchainPrivate
- Parameters:
requirements
- Map<String, String> key value pair, may not benull
- Returns:
true
if the requirements match, otherwisefalse
-
getLog
protected org.codehaus.plexus.logging.Logger getLog()
-
-