Interface ValueResolver<K extends CharSequence>

Type Parameters:
K - parent type
All Known Subinterfaces:
AnnotationValueResolver, ApplicationContext, BeanElementVisitorContext, BeanResolutionContext, ConditionContext<T>, 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 Type
    Method
    Description
    <T> Optional<T>
    get(K name, ArgumentConversionContext<T> conversionContext)
    Resolve the given property for the given name.
    default <T> Optional<T>
    get(K name, Argument<T> requiredType)
    Resolve the given property for the given name.
    default <T> Optional<T>
    get(K name, Class<T> requiredType)
    Resolve the given property for the given name.
    default <T> T
    get(K name, Class<T> requiredType, T defaultValue)
    Resolve the given property for the given name.
  • Method Details

    • get

      <T> Optional<T> get(K name, ArgumentConversionContext<T> conversionContext)
      Resolve the given property for the given name.
      Type Parameters:
      T - The concrete type
      Parameters:
      name - The name
      conversionContext - The conversion context
      Returns:
      An optional containing the property value if it exists and is able to be converted
    • get

      default <T> Optional<T> get(K name, Class<T> requiredType)
      Resolve the given property for the given name.
      Type Parameters:
      T - The concrete type
      Parameters:
      name - The name
      requiredType - The required type
      Returns:
      An optional containing the property value if it exists and is able to be converted
    • get

      default <T> Optional<T> get(K name, Argument<T> requiredType)
      Resolve the given property for the given name.
      Type Parameters:
      T - The concrete type
      Parameters:
      name - The name
      requiredType - The required type
      Returns:
      An optional containing the property value if it exists and is able to be converted
    • get

      default <T> T get(K name, Class<T> requiredType, T defaultValue)
      Resolve the given property for the given name.
      Type Parameters:
      T - The concrete type
      Parameters:
      name - The name
      requiredType - The required type
      defaultValue - The default value
      Returns:
      Property value if it exists or default value