Class SimpleFilter

java.lang.Object
org.apache.maven.plugins.shade.filter.SimpleFilter
All Implemented Interfaces:
Filter

public class SimpleFilter extends Object implements Filter
  • Field Details

    • jars

      private Set<File> jars
    • includes

      private Set<String> includes
    • excludes

      private Set<String> excludes
    • excludeDefaults

      private boolean excludeDefaults
  • Constructor Details

    • SimpleFilter

      @Deprecated public SimpleFilter(Set<File> jars, Set<String> includes, Set<String> excludes)
      Deprecated.
      As of release 3.2.2, replaced by SimpleFilter(Set, ArchiveFilter)}
      Parameters:
      jars - set of Files.
      includes - set of includes.
      excludes - set of excludes.
    • SimpleFilter

      public SimpleFilter(Set<File> jars, ArchiveFilter archiveFilter)
      Parameters:
      jars - set of Files.
      archiveFilter - set of ArchiveFilters.
    • SimpleFilter

      private SimpleFilter(Set<File> jars, Set<String> includes, Set<String> excludes, boolean excludeDefaults)
      Parameters:
      jars - set of Files.
      includes - set of includes.
      excludes - set of excludes.
      excludeDefaults - whether to exclude default includes once includes are provided explicitly.
  • Method Details

    • canFilter

      public boolean canFilter(File jar)
      Specified by:
      canFilter in interface Filter
      Parameters:
      jar - The jar file.
      Returns:
      true if we can filter false otherwise.
    • isFiltered

      public boolean isFiltered(String classFile)
      Specified by:
      isFiltered in interface Filter
      Parameters:
      classFile - The classFile.
      Returns:
      true if the file has been filtered false otherwise.
    • isSpecificallyIncluded

      public boolean isSpecificallyIncluded(String classFile)
      Parameters:
      classFile - The class file.
      Returns:
      true if included false otherwise.
    • isIncluded

      private boolean isIncluded(String classFile)
    • isExcluded

      private boolean isExcluded(String classFile)
    • matchPaths

      private boolean matchPaths(Set<String> patterns, String classFile)
    • normalizePath

      private String normalizePath(String path)
    • normalizePatterns

      private Set<String> normalizePatterns(Set<String> patterns)
    • finished

      public void finished()
      If we are finished.
      Specified by:
      finished in interface Filter