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 java.lang.Object implements DefaultPropertyPlaceholderResolver.Segment
A segment that represents one or more expressions that should be searched for in the environment.- Since:
- 1.1.0
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.String>getExpressions()<T> TgetValue(java.lang.Class<T> type)Returns the value of a given segment converted to the provided type.
-
-
-
Method Detail
-
getExpressions
public java.util.List<java.lang.String> getExpressions()
- Returns:
- The list of expressions that may be looked up in the environment
-
getValue
public <T> T getValue(java.lang.Class<T> type) throws ConfigurationExceptionDescription copied from interface:DefaultPropertyPlaceholderResolver.SegmentReturns the value of a given segment converted to the provided type.- Specified by:
getValuein 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
-
-