StandardJarScanFilter (Apache Tomcat 10.1.55 API Documentation)
Description: declaration: package: org.apache.tomcat.util.scan, class: StandardJarScanFilter

# Class StandardJarScanFilter

java.lang.Object
org.apache.tomcat.util.scan.StandardJarScanFilter

All Implemented Interfaces:
  `JarScanFilter`

public class StandardJarScanFilter extends Object implements JarScanFilter

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `StandardJarScanFilter()`
  This is the standard implementation of `JarScanFilter`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `check(JarScanType jarScanType, String jarName)`
  `String`
  `getPluggabilityScan()`
  `String`
  `getPluggabilitySkip()`
  `String`
  `getTldScan()`
  `String`
  `getTldSkip()`
  `boolean`
  `isDefaultPluggabilityScan()`
  `boolean`
  `isDefaultTldScan()`
  `boolean`
  `isSkipAll()`
  `void`
  `setDefaultPluggabilityScan(boolean defaultPluggabilityScan)`
  `void`
  `setDefaultTldScan(boolean defaultTldScan)`
  `void`
  `setPluggabilityScan(String pluggabilityScan)`
  `void`
  `setPluggabilitySkip(String pluggabilitySkip)`
  `void`
  `setTldScan(String tldScan)`
  `void`
  `setTldSkip(String tldSkip)`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### StandardJarScanFilter

    public StandardJarScanFilter()
    This is the standard implementation of `JarScanFilter`. By default, the following filtering rules are used:
    - JARs that match neither the skip nor the scan list will be included in scan results.
    - JARs that match the skip list but not the scan list will be excluded from scan results.
    - JARs that match the scan list will be included from scan results.
    The default skip list and default scan list are obtained from the system properties `Constants.SKIP_JARS_PROPERTY` and `Constants.SCAN_JARS_PROPERTY` respectively. These default values may be over-ridden for the `JarScanType.TLD` and `JarScanType.PLUGGABILITY` scans. The filtering rules may also be modified for these scan types using `setDefaultTldScan(boolean)` and `setDefaultPluggabilityScan(boolean)`. If set to `false`, the following filtering rules are used for associated type:
    - JARs that match neither the skip nor the scan list will be excluded from scan results.
    - JARs that match the scan list but not the skip list will be included in scan results.
    - JARs that match the skip list will be excluded from scan results.

- ## Method Details

  - ### getTldSkip

    public String getTldSkip()

  - ### setTldSkip

    public void setTldSkip(String tldSkip)

  - ### getTldScan

    public String getTldScan()

  - ### setTldScan

    public void setTldScan(String tldScan)

  - ### isSkipAll

    public boolean isSkipAll()
    Specified by:
      `isSkipAll` in interface `JarScanFilter`
    Returns:
      `true` if all of the scans should be skipped which can improve startup performance. The default is `false`.

  - ### isDefaultTldScan

    public boolean isDefaultTldScan()

  - ### setDefaultTldScan

    public void setDefaultTldScan(boolean defaultTldScan)

  - ### getPluggabilitySkip

    public String getPluggabilitySkip()

  - ### setPluggabilitySkip

    public void setPluggabilitySkip(String pluggabilitySkip)

  - ### getPluggabilityScan

    public String getPluggabilityScan()

  - ### setPluggabilityScan

    public void setPluggabilityScan(String pluggabilityScan)

  - ### isDefaultPluggabilityScan

    public boolean isDefaultPluggabilityScan()

  - ### setDefaultPluggabilityScan

    public void setDefaultPluggabilityScan(boolean defaultPluggabilityScan)

  - ### check

    public boolean check(JarScanType jarScanType, String jarName)
    Specified by:
      `check` in interface `JarScanFilter`
    Parameters:
      `jarScanType` - The type of JAR scan currently being performed
      `jarName` - The name of the JAR file (without any path information) to be checked to see if it should be included in the results or not
    Returns:
      `true` if the JAR should be returned in the results, `false` if it should be excluded