Interface Configuration

All Known Implementing Classes:
DefaultConfiguration

public interface Configuration
Author:
James R. Perkins
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> Optional<T>
    getOptionalValue(String name, Class<T> type)
    Returns the resolved value for the specified type of the named property.
    <T> T
    getValue(String name, Class<T> type)
    Returns the resolved value for the specified type of the named property.
  • Method Details

    • getOptionalValue

      <T> Optional<T> getOptionalValue(String name, Class<T> type)
      Returns the resolved value for the specified type of the named property.
      Type Parameters:
      T - the property type
      Parameters:
      name - the name of the parameter
      type - the type to convert the value to
      Returns:
      the resolved optional value
      Throws:
      IllegalArgumentException - if the type is not supported
      SecurityException - if the security manager is present and the ConfigPropertyPermission for the property is not allowed
    • getValue

      <T> T getValue(String name, Class<T> type)
      Returns the resolved value for the specified type of the named property.
      Type Parameters:
      T - the property type
      Parameters:
      name - the name of the parameter
      type - the type to convert the value to
      Returns:
      the resolved value
      Throws:
      IllegalArgumentException - if the type is not supported
      NoSuchElementException - if there is no property associated with the name
      SecurityException - if the security manager is present and the ConfigPropertyPermission for the property is not allowed