Package io.micronaut.core.value
Interface ValueResolver<K extends CharSequence>
- Type Parameters:
K- parent type
- All Known Subinterfaces:
AnnotationValueResolver,ApplicationContext,BeanElementVisitorContext,BeanResolutionContext,ConditionContext<T>,ConfigurableApplicationContext,ConvertibleMultiValues<V>,ConvertibleValues<V>,Cookies,Environment,Headers,HttpHeaders,HttpParameters,MessageHeaders,MutableConvertibleMultiValues<V>,MutableConvertibleValues<V>,MutableHeaders,MutableHttpHeaders,MutableHttpParameters,PropertyResolver,VisitorContext,WebSocketSession
- All Known Implementing Classes:
AbstractBeanResolutionContext,AnnotationValue,CaseInsensitiveMutableHttpHeaders,ConvertibleMultiValuesMap,ConvertibleValuesMap,DefaultApplicationContext,DefaultBeanResolutionContext,DefaultEnvironment,EvaluatedAnnotationValue,GroovyVisitorContext,HttpHeadersAdapter,JavaVisitorContext,JsonNodeConvertibleValues,MapPropertyResolver,MutableConvertibleMultiValuesMap,MutableConvertibleValuesMap,NettyCookies,NettyHttpHeaders,NettyHttpParameters,NettyWebSocketSession,ObjectNodeConvertibleValues,PropertySourcePropertyResolver,SimpleCookies,SimpleHttpHeaders,SimpleHttpParameters
public interface ValueResolver<K extends CharSequence>
An interface for any type that is able to resolve and convert values.
- Since:
- 1.0
- Author:
- Graeme Rocher
- 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
-