Interface DefaultPropertyPlaceholderResolver.Segment

All Known Implementing Classes:
DefaultPropertyPlaceholderResolver.PlaceholderSegment, DefaultPropertyPlaceholderResolver.RawSegment
Enclosing class:
DefaultPropertyPlaceholderResolver

public static interface DefaultPropertyPlaceholderResolver.Segment
A segment of placeholder resolution.
Since:
1.1.0
Author:
James Kleeh
  • Method Summary

    Modifier and Type
    Method
    Description
    default <T> Optional<T>
    findValue(Class<T> type)
    Returns the optional value of a given segment converted to the provided type.
    <T> T
    getValue(Class<T> type)
    Returns the value of a given segment converted to the provided type.
  • Method Details

    • getValue

      <T> T getValue(Class<T> type) throws ConfigurationException
      Returns the value of a given segment converted to the provided type.
      Type Parameters:
      T - The type to convert the value to
      Parameters:
      type - The class
      Returns:
      The converted value
      Throws:
      ConfigurationException - If any error occurs
    • findValue

      default <T> Optional<T> findValue(Class<T> type)
      Returns the optional value of a given segment converted to the provided type. Any conversions errors are ignored.
      Type Parameters:
      T - The type to convert the value to
      Parameters:
      type - The class
      Returns:
      The converted optional value
      Since:
      4.2.0