Package io.micronaut.core.value
Interface ValueResolver<K extends CharSequence>
- Type Parameters:
K- parent type
- All Known Subinterfaces:
AnnotationValueResolver,ConvertibleMultiValues<V>,ConvertibleValues<V>,Headers,MutableConvertibleMultiValues<V>,MutableConvertibleValues<V>,MutableHeaders,PropertyResolver
- All Known Implementing Classes:
AnnotationValue,ConvertibleMultiValuesMap,ConvertibleValuesMap,MapPropertyResolver,MutableConvertibleMultiValuesMap,MutableConvertibleValuesMap
public interface ValueResolver<K extends CharSequence>
An interface for any type that is able to resolve and convert values.
- Since:
- 1.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescription<T> Optional<T>get(K name, ArgumentConversionContext<T> conversionContext) Resolve the given property for the given name.default <T> Optional<T>Resolve the given property for the given name.default <T> Optional<T>Resolve the given property for the given name.default <T> TResolve the given property for the given name.
-
Method Details
-
get
Resolve the given property for the given name.- Type Parameters:
T- The concrete type- Parameters:
name- The nameconversionContext- The conversion context- Returns:
- An optional containing the property value if it exists and is able to be converted
-
get
Resolve the given property for the given name.- Type Parameters:
T- The concrete type- Parameters:
name- The namerequiredType- The required type- Returns:
- An optional containing the property value if it exists and is able to be converted
-
get
Resolve the given property for the given name.- Type Parameters:
T- The concrete type- Parameters:
name- The namerequiredType- The required type- Returns:
- An optional containing the property value if it exists and is able to be converted
-
get
Resolve the given property for the given name.- Type Parameters:
T- The concrete type- Parameters:
name- The namerequiredType- The required typedefaultValue- The default value- Returns:
- Property value if it exists or default value
-