IntrospectionUtils.SecurePropertySource (Apache Tomcat 10.1.48 API Documentation)
Description: declaration: package: org.apache.tomcat.util, class: IntrospectionUtils, interface: SecurePropertySource

# Interface IntrospectionUtils.SecurePropertySource

All Superinterfaces:
  `IntrospectionUtils.PropertySource`

All Known Implementing Classes:
  `EnvironmentPropertySource, ServiceBindingPropertySource, SystemPropertySource`

Enclosing class:
  `IntrospectionUtils`

public static interface IntrospectionUtils.SecurePropertySource extends IntrospectionUtils.PropertySource

- ## Method Summary

  Modifier and Type
  Method
  Description
  `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 interface IntrospectionUtils.PropertySource

  `getProperty`

- ## Method Details

  - ### getProperty

    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. 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)`
    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