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 informations for the project.
See Also:
  • Method Details

    • getPlugins

      @Nonnull public List<Plugin> getPlugins()
      The list of plugins to use.
      Returns:
      a List<Plugin>
    • getLocation

      public InputLocation getLocation(Object key)
      Gets the location of the specified field in the input source.
      Specified by:
      getLocation in interface InputLocationTracker
    • with

      Creates a new builder with this object as the basis.
      Returns:
      a Builder
    • withPlugins

      @Nonnull public PluginContainer withPlugins(Collection<Plugin> plugins)
      Creates a new PluginContainer instance using the specified plugins.
      Parameters:
      plugins - the new Collection<Plugin> to use
      Returns:
      a PluginContainer with the specified plugins
    • newInstance

      @Nonnull public static PluginContainer newInstance()
      Creates a new PluginContainer instance. Equivalent to newInstance( true ).
      Returns:
      a new PluginContainer
      See Also:
    • newInstance

      @Nonnull public static PluginContainer newInstance(boolean withDefaults)
      Creates a new PluginContainer instance using default values or not. Equivalent to newBuilder( withDefaults ).build().
      Parameters:
      withDefaults - the boolean indicating whether default values should be used
      Returns:
      a new PluginContainer
    • newBuilder

      @Nonnull public static PluginContainer.Builder newBuilder()
      Creates a new PluginContainer builder instance. Equivalent to newBuilder( true ).
      Returns:
      a new Builder
      See Also:
    • newBuilder

      @Nonnull public static PluginContainer.Builder newBuilder(boolean withDefaults)
      Creates a new PluginContainer builder instance using default values or not.
      Parameters:
      withDefaults - the boolean indicating whether default values should be used
      Returns:
      a new Builder
    • newBuilder

      @Nonnull public static PluginContainer.Builder newBuilder(PluginContainer from)
      Creates a new PluginContainer builder instance using the specified object as a basis. Equivalent to newBuilder( from, false ).
      Parameters:
      from - the PluginContainer instance to use as a basis
      Returns:
      a new Builder
    • newBuilder

      @Nonnull public static PluginContainer.Builder newBuilder(PluginContainer from, boolean forceCopy)
      Creates a new PluginContainer builder instance using the specified object as a basis.
      Parameters:
      from - the PluginContainer instance to use as a basis
      forceCopy - the boolean indicating if a copy should be forced
      Returns:
      a new Builder
    • getPluginsAsMap

      public Map<String,Plugin> getPluginsAsMap()
      Returns:
      a Map of plugins field with Plugins#getKey() as key
      See Also:
    • toString

      public String toString()
      Overrides:
      toString in class Object