Package io.micronaut.context.env
Class DefaultPropertyPlaceholderResolver.PlaceholderSegment
java.lang.Object
io.micronaut.context.env.DefaultPropertyPlaceholderResolver.PlaceholderSegment
- All Implemented Interfaces:
DefaultPropertyPlaceholderResolver.Segment
- Enclosing class:
- DefaultPropertyPlaceholderResolver
public class DefaultPropertyPlaceholderResolver.PlaceholderSegment
extends Object
implements DefaultPropertyPlaceholderResolver.Segment
A segment that represents one or more expressions
that should be searched for in the environment.
- Since:
- 1.1.0
- Author:
- James Kleeh
-
Method Summary
-
Method Details
-
getExpressions
- Returns:
- The list of expressions that may be looked up in the environment
-
getValue
Description copied from interface:DefaultPropertyPlaceholderResolver.Segment
Returns the value of a given segment converted to the provided type.- Specified by:
getValue
in interfaceDefaultPropertyPlaceholderResolver.Segment
- 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
Description copied from interface:DefaultPropertyPlaceholderResolver.Segment
Returns the optional value of a given segment converted to the provided type. Any conversions errors are ignored.- Specified by:
findValue
in interfaceDefaultPropertyPlaceholderResolver.Segment
- Type Parameters:
T
- The type to convert the value to- Parameters:
type
- The class- Returns:
- The converted optional value
-