Package org.apache.maven.api.model
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:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Builder class used to create PatternSet instances. -
Method Summary
Modifier and TypeMethodDescriptionA list of patterns to exclude, e.g.A list of patterns to include, e.g.getLocation
(Object key) Gets the location of the specified field in the input source.static PatternSet.Builder
Creates a newPatternSet
builder instance.static PatternSet.Builder
newBuilder
(boolean withDefaults) Creates a newPatternSet
builder instance using default values or not.static PatternSet.Builder
newBuilder
(PatternSet from) Creates a newPatternSet
builder instance using the specified object as a basis.static PatternSet.Builder
newBuilder
(PatternSet from, boolean forceCopy) Creates a newPatternSet
builder instance using the specified object as a basis.static PatternSet
Creates a newPatternSet
instance.static PatternSet
newInstance
(boolean withDefaults) Creates a newPatternSet
instance using default values or not.toString()
with()
Creates a new builder with this object as the basis.withExcludes
(Collection<String> excludes) Creates a newPatternSet
instance using the specified excludes.withIncludes
(Collection<String> includes) Creates a newPatternSet
instance using the specified includes.
-
Method Details
-
getIncludes
A list of patterns to include, e.g.**/*.xml
.- Returns:
- a
List<String>
-
getExcludes
A list of patterns to exclude, e.g.**/*.xml
- Returns:
- a
List<String>
-
getLocation
Gets the location of the specified field in the input source.- Specified by:
getLocation
in interfaceInputLocationTracker
-
with
Creates a new builder with this object as the basis.- Returns:
- a
Builder
-
withIncludes
Creates a newPatternSet
instance using the specified includes.- Parameters:
includes
- the newCollection<String>
to use- Returns:
- a
PatternSet
with the specified includes
-
withExcludes
Creates a newPatternSet
instance using the specified excludes.- Parameters:
excludes
- the newCollection<String>
to use- Returns:
- a
PatternSet
with the specified excludes
-
newInstance
Creates a newPatternSet
instance. Equivalent tonewInstance( true )
.- Returns:
- a new
PatternSet
- See Also:
-
newInstance
Creates a newPatternSet
instance using default values or not. Equivalent tonewBuilder( withDefaults ).build()
.- Parameters:
withDefaults
- the boolean indicating whether default values should be used- Returns:
- a new
PatternSet
-
newBuilder
Creates a newPatternSet
builder instance. Equivalent tonewBuilder( true )
.- Returns:
- a new
Builder
- See Also:
-
newBuilder
Creates a newPatternSet
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 newPatternSet
builder instance using the specified object as a basis. Equivalent tonewBuilder( from, false )
.- Parameters:
from
- thePatternSet
instance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newPatternSet
builder instance using the specified object as a basis.- Parameters:
from
- thePatternSet
instance to use as a basisforceCopy
- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-
toString
-