Package org.apache.maven.api.model
Class PluginContainer
java.lang.Object
org.apache.maven.api.model.PluginContainer
- All Implemented Interfaces:
Serializable
,InputLocationTracker
- Direct Known Subclasses:
PluginConfiguration
,PluginManagement
@Experimental
@Generated
@ThreadSafe
@Immutable
public class PluginContainer
extends Object
implements Serializable, InputLocationTracker
Contains the plugins information for the project.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Builder class used to create PluginContainer instances. -
Constructor Summary
ModifierConstructorDescriptionprotected
PluginContainer
(PluginContainer.Builder builder) Constructor for this class, to be called from its subclasses andPluginContainer.Builder
. -
Method Summary
Modifier and TypeMethodDescriptionGets the input location that caused this model to be read.getLocation
(Object key) Gets the location of the specified field in the input source.Gets the keys of the locations of the input source.The list of plugins to use.static PluginContainer.Builder
Creates a newPluginContainer
builder instance.static PluginContainer.Builder
newBuilder
(boolean withDefaults) Creates a newPluginContainer
builder instance using default values or not.static PluginContainer.Builder
newBuilder
(PluginContainer from) Creates a newPluginContainer
builder instance using the specified object as a basis.static PluginContainer.Builder
newBuilder
(PluginContainer from, boolean forceCopy) Creates a newPluginContainer
builder instance using the specified object as a basis.static PluginContainer
Creates a newPluginContainer
instance.static PluginContainer
newInstance
(boolean withDefaults) Creates a newPluginContainer
instance using default values or not.toString()
with()
Creates a new builder with this object as the basis.withPlugins
(Collection<Plugin> plugins) Creates a newPluginContainer
instance using the specified plugins.
-
Constructor Details
-
PluginContainer
Constructor for this class, to be called from its subclasses andPluginContainer.Builder
.- See Also:
-
-
Method Details
-
getPlugins
The list of plugins to use.- Returns:
- a
List<Plugin>
-
getLocation
Gets the location of the specified field in the input source.- Specified by:
getLocation
in interfaceInputLocationTracker
-
getLocationKeys
Gets the keys of the locations of the input source. -
getImportedFrom
Gets the input location that caused this model to be read.- Specified by:
getImportedFrom
in interfaceInputLocationTracker
- Returns:
- InputLocation
-
with
Creates a new builder with this object as the basis.- Returns:
- a
Builder
-
withPlugins
Creates a newPluginContainer
instance using the specified plugins.- Parameters:
plugins
- the newCollection<Plugin>
to use- Returns:
- a
PluginContainer
with the specified plugins
-
newInstance
Creates a newPluginContainer
instance. Equivalent tonewInstance(true)
.- Returns:
- a new
PluginContainer
- See Also:
-
newInstance
Creates a newPluginContainer
instance using default values or not. Equivalent tonewBuilder(withDefaults).build()
.- Parameters:
withDefaults
- the boolean indicating whether default values should be used- Returns:
- a new
PluginContainer
-
newBuilder
Creates a newPluginContainer
builder instance. Equivalent tonewBuilder(true)
.- Returns:
- a new
Builder
- See Also:
-
newBuilder
Creates a newPluginContainer
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 newPluginContainer
builder instance using the specified object as a basis. Equivalent tonewBuilder(from, false)
.- Parameters:
from
- thePluginContainer
instance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newPluginContainer
builder instance using the specified object as a basis.- Parameters:
from
- thePluginContainer
instance to use as a basisforceCopy
- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-
getPluginsAsMap
- Returns:
- a Map of plugins field with
Plugins#getKey()
as key - See Also:
-
toString
-