Class InjectableValues.Std

  • All Implemented Interfaces:
    java.io.Serializable
    Enclosing class:
    InjectableValues

    public static class InjectableValues.Std
    extends InjectableValues.Base
    implements java.io.Serializable
    Simple standard implementation which uses a simple Map to store values to inject, identified by simple String keys.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.Map<java.lang.String,​java.lang.Object> _values  
      private static long serialVersionUID  
    • Constructor Summary

      Constructors 
      Constructor Description
      Std()  
      Std​(java.util.Map<java.lang.String,​java.lang.Object> values)  
    • Field Detail

      • _values

        protected final java.util.Map<java.lang.String,​java.lang.Object> _values
    • Constructor Detail

      • Std

        public Std()
      • Std

        public Std​(java.util.Map<java.lang.String,​java.lang.Object> values)
    • Method Detail

      • addValue

        public InjectableValues.Std addValue​(java.lang.String key,
                                             java.lang.Object value)
      • addValue

        public InjectableValues.Std addValue​(java.lang.Class<?> classKey,
                                             java.lang.Object value)
      • findInjectableValue

        public java.lang.Object findInjectableValue​(DeserializationContext ctxt,
                                                    java.lang.Object valueId,
                                                    BeanProperty forProperty,
                                                    java.lang.Object beanInstance,
                                                    java.lang.Boolean optional,
                                                    java.lang.Boolean useInput)
                                             throws JsonMappingException
        Description copied from class: InjectableValues
        Method called to find value identified by id valueId to inject as value of specified property during deserialization, passing POJO instance in which value will be injected if it is available (will be available when injected via field or setter; not available when injected via constructor or factory method argument).
        Overrides:
        findInjectableValue in class InjectableValues
        Parameters:
        ctxt - Deserialization context
        valueId - Object that identifies value to inject; may be a simple name or more complex identifier object, whatever provider needs
        forProperty - Bean property in which value is to be injected
        beanInstance - Bean instance that contains property to inject, if available; null if bean has not yet been constructed.
        optional - Flag used for configuring the behavior when the value to inject is not found
        Throws:
        JsonMappingException