Class FileSet

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

A PatternSet for files.
See Also:
  • Method Details

    • getDirectory

      public String getDirectory()
      Describe the directory where the resources are stored. The path is relative to the POM.
      Returns:
      a String
    • getLocation

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

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

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

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

      @Nonnull public FileSet withDirectory(String directory)
      Creates a new FileSet instance using the specified directory.
      Parameters:
      directory - the new String to use
      Returns:
      a FileSet with the specified directory
    • newInstance

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

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

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

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

      @Nonnull public static FileSet.Builder newBuilder(FileSet from, boolean forceCopy)
      Creates a new FileSet builder instance using the specified object as a basis.
      Parameters:
      from - the FileSet 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 PatternSet
      See Also: