Class PatternSet

java.lang.Object
org.apache.maven.api.model.PatternSet
All Implemented Interfaces:
Serializable, InputLocationTracker
Direct Known Subclasses:
FileSet

@Experimental @Generated @ThreadSafe @Immutable public class PatternSet extends Object implements Serializable, InputLocationTracker
Definition of include or exclude patterns.
See Also:
  • Method Details

    • getIncludes

      @Nonnull public List<String> getIncludes()
      A list of patterns to include, e.g. **&#47;*.xml.
      Returns:
      a List<String>
    • getExcludes

      @Nonnull public List<String> getExcludes()
      A list of patterns to exclude, e.g. **&#47;*.xml
      Returns:
      a List<String>
    • getLocation

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

      @Nonnull public PatternSet.Builder with()
      Creates a new builder with this object as the basis.
      Returns:
      a Builder
    • withIncludes

      @Nonnull public PatternSet withIncludes(Collection<String> includes)
      Creates a new PatternSet instance using the specified includes.
      Parameters:
      includes - the new Collection<String> to use
      Returns:
      a PatternSet with the specified includes
    • withExcludes

      @Nonnull public PatternSet withExcludes(Collection<String> excludes)
      Creates a new PatternSet instance using the specified excludes.
      Parameters:
      excludes - the new Collection<String> to use
      Returns:
      a PatternSet with the specified excludes
    • newInstance

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

      @Nonnull public static PatternSet newInstance(boolean withDefaults)
      Creates a new PatternSet 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 PatternSet
    • newBuilder

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

      @Nonnull public static PatternSet.Builder newBuilder(boolean withDefaults)
      Creates a new PatternSet 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 PatternSet.Builder newBuilder(PatternSet from)
      Creates a new PatternSet builder instance using the specified object as a basis. Equivalent to newBuilder( from, false ).
      Parameters:
      from - the PatternSet instance to use as a basis
      Returns:
      a new Builder
    • newBuilder

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

      public String toString()
      Overrides:
      toString in class Object
      See Also: