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
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder class used to create PatternSet instances. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPatternSet(PatternSet.Builder builder) Constructor for this class, to be called from its subclasses andPatternSet.Builder. -
Method Summary
Modifier and TypeMethodDescriptionA list of patterns to exclude, e.g.Gets the input location that caused this model to be read.A list of patterns to include, e.g.getLocation(Object key) Gets the location of the specified field in the input source.Gets the keys of the locations of the input source.static PatternSet.BuilderCreates a newPatternSetbuilder instance.static PatternSet.BuildernewBuilder(boolean withDefaults) Creates a newPatternSetbuilder instance using default values or not.static PatternSet.BuildernewBuilder(PatternSet from) Creates a newPatternSetbuilder instance using the specified object as a basis.static PatternSet.BuildernewBuilder(PatternSet from, boolean forceCopy) Creates a newPatternSetbuilder instance using the specified object as a basis.static PatternSetCreates a newPatternSetinstance.static PatternSetnewInstance(boolean withDefaults) Creates a newPatternSetinstance using default values or not.toString()with()Creates a new builder with this object as the basis.withExcludes(Collection<String> excludes) Creates a newPatternSetinstance using the specified excludes.withIncludes(Collection<String> includes) Creates a newPatternSetinstance using the specified includes.
-
Constructor Details
-
PatternSet
Constructor for this class, to be called from its subclasses andPatternSet.Builder.- See Also:
-
-
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:
getLocationin interfaceInputLocationTracker
-
getLocationKeys
Gets the keys of the locations of the input source. -
getLocationKeyStream
-
getImportedFrom
Gets the input location that caused this model to be read.- Specified by:
getImportedFromin interfaceInputLocationTracker- Returns:
- InputLocation
-
with
Creates a new builder with this object as the basis.- Returns:
- a
Builder
-
withIncludes
Creates a newPatternSetinstance using the specified includes.- Parameters:
includes- the newCollection<String>to use- Returns:
- a
PatternSetwith the specified includes
-
withExcludes
Creates a newPatternSetinstance using the specified excludes.- Parameters:
excludes- the newCollection<String>to use- Returns:
- a
PatternSetwith the specified excludes
-
newInstance
Creates a newPatternSetinstance. Equivalent tonewInstance(true).- Returns:
- a new
PatternSet - See Also:
-
newInstance
Creates a newPatternSetinstance 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 newPatternSetbuilder instance. Equivalent tonewBuilder(true).- Returns:
- a new
Builder - See Also:
-
newBuilder
Creates a newPatternSetbuilder instance using default values or not.- Parameters:
withDefaults- the boolean indicating whether default values should be used- Returns:
- a new
Builder
-
newBuilder
Creates a newPatternSetbuilder instance using the specified object as a basis. Equivalent tonewBuilder(from, false).- Parameters:
from- thePatternSetinstance to use as a basis- Returns:
- a new
Builder
-
newBuilder
Creates a newPatternSetbuilder instance using the specified object as a basis.- Parameters:
from- thePatternSetinstance to use as a basisforceCopy- the boolean indicating if a copy should be forced- Returns:
- a new
Builder
-
toString
-