SystemPropertySource (Apache Tomcat 9.0.118 API Documentation)
Description: declaration: package: org.apache.tomcat.util.digester, class: SystemPropertySource

# Class SystemPropertySource

java.lang.Object
org.apache.tomcat.util.digester.SystemPropertySource

All Implemented Interfaces:
  `IntrospectionUtils.PropertySource, IntrospectionUtils.SecurePropertySource`

public class SystemPropertySource extends Object implements IntrospectionUtils.SecurePropertySource
A `IntrospectionUtils.SecurePropertySource` that uses system properties to resolve expressions. This property source is always active by default.

See Also:
  - `Digester`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `SystemPropertySource()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getProperty(String key)`
  `String`
  `getProperty(String key, ClassLoader classLoader)`
  Obtain a property value, checking that code associated with the provided class loader has permission to access the property.

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### SystemPropertySource

    public SystemPropertySource()

- ## Method Details

  - ### getProperty

    public String getProperty(String key)
    Specified by:
      `getProperty` in interface `IntrospectionUtils.PropertySource`

  - ### getProperty

    public String getProperty(String key, ClassLoader classLoader)
    Description copied from interface: `IntrospectionUtils.SecurePropertySource`
    Obtain a property value, checking that code associated with the provided class loader has permission to access the property. If the `classLoader` is `null` or if `classLoader` does not implement `PermissionCheck` then the property value will be looked up without a call to `PermissionCheck.check(java.security.Permission)`
    Specified by:
      `getProperty` in interface `IntrospectionUtils.SecurePropertySource`
    Parameters:
      `key` - The key of the requested property
      `classLoader` - The class loader associated with the code that trigger the property lookup
    Returns:
      The property value or `null` if it could not be found or if `PermissionCheck.check(java.security.Permission)` fails