Package org.apache.maven.api.toolchain
Class ToolchainModel
java.lang.Object
org.apache.maven.api.toolchain.TrackableBase
org.apache.maven.api.toolchain.ToolchainModel
- All Implemented Interfaces:
Serializable
@Experimental
@Generated
@ThreadSafe
@Immutable
public class ToolchainModel
extends TrackableBase
implements Serializable
Definition of a toolchain instance.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Builder class used to create ToolchainModel instances. -
Field Summary
Fields inherited from class org.apache.maven.api.toolchain.TrackableBase
GLOBAL_LEVEL, USER_LEVEL
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Method equals.Toolchain configuration information, like location or any information that is to be retrieved.Toolchain identification information, which will be matched against project requirements.getType()
int
hashCode()
Method hashCode.static ToolchainModel.Builder
Creates a newToolchainModel
builder instance.static ToolchainModel.Builder
newBuilder
(boolean withDefaults) Creates a newToolchainModel
builder instance using default values or not.static ToolchainModel.Builder
newBuilder
(ToolchainModel from) Creates a newToolchainModel
builder instance using the specified object as a basis.static ToolchainModel.Builder
newBuilder
(ToolchainModel from, boolean forceCopy) Creates a newToolchainModel
builder instance using the specified object as a basis.static ToolchainModel
Creates a newToolchainModel
instance.static ToolchainModel
newInstance
(boolean withDefaults) Creates a newToolchainModel
instance using default values or not.with()
Creates a new builder with this object as the basis.withConfiguration
(XmlNode configuration) Creates a newToolchainModel
instance using the specified configuration.withProvides
(Map<String, String> provides) Creates a newToolchainModel
instance using the specified provides.Creates a newToolchainModel
instance using the specified type.Methods inherited from class org.apache.maven.api.toolchain.TrackableBase
getSourceLevel, newBuilder, newBuilder, setSourceLevel
-
Method Details
-
getType
Type of toolchain:jdk
for JDK Standard Toolchain,- other value for Custom Toolchain
- Returns:
- a
String
-
getProvides
Toolchain identification information, which will be matched against project requirements.
For Maven 2.0.9 to 3.2.3, the actual content structure was completely open: each toolchain type would define its own format and semantics. In general, this was a properties format.
Since Maven 3.2.4, the type for this field has been changed to Properties to match the de-facto format.
Each toolchain defines its own properties names and semantics.
- Returns:
- a
Map<String, String>
-
getConfiguration
Toolchain configuration information, like location or any information that is to be retrieved.
Actual content structure is completely open: each toolchain type will define its own format and semantics.
In general, this is a properties format:
<name>value</name>
with per-toolchain defined properties names.- Returns:
- a
XmlNode
-
with
Creates a new builder with this object as the basis.- Overrides:
with
in classTrackableBase
- Returns:
- a
Builder
-
withType
Creates a newToolchainModel
instance using the specified type.- Parameters:
type
- the newString
to use- Returns:
- a
ToolchainModel
with the specified type
-
withProvides
Creates a newToolchainModel
instance using the specified provides.- Parameters:
provides
- the newMap<String, String>
to use- Returns:
- a
ToolchainModel
with the specified provides
-
withConfiguration
Creates a newToolchainModel
instance using the specified configuration.- Parameters:
configuration
- the newXmlNode
to use- Returns:
- a
ToolchainModel
with the specified configuration
-
newInstance
Creates a newToolchainModel
instance. Equivalent tonewInstance( true )
.- Returns:
- a new
ToolchainModel
- See Also:
-
newInstance
Creates a newToolchainModel
instance using default values or not. Equivalent tonewBuilder( withDefaults ).build()
.- Parameters:
withDefaults
- the boolean indicating whether default values should be used- Returns:
- a new
ToolchainModel
-
newBuilder
Creates a newToolchainModel
builder instance. Equivalent tonewBuilder( true )
.- Returns:
- a new
Builder
- See Also:
-
newBuilder
Creates a newToolchainModel
builder instance using default values or not.- Parameters:
withDefaults
- the boolean indicating whether default values should be used- Returns:
- a new
Builder
-
newBuilder
Creates a newToolchainModel
builder instance using the specified object as a basis. Equivalent tonewBuilder( from, false )
.- Parameters:
from
- theToolchainModel
instance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newToolchainModel
builder instance using the specified object as a basis.- Parameters:
from
- theToolchainModel
instance to use as a basisforceCopy
- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-
hashCode
public int hashCode()Method hashCode. -
equals
Method equals.
-