Class PropertyValue

    • Constructor Detail

      • PropertyValue

        public PropertyValue​(String name,
                             Object value)
        Create a new PropertyValue instance.
        Parameters:
        name - the name of the property (never null)
        value - the value of the property (possibly before type conversion)
      • PropertyValue

        public PropertyValue​(PropertyValue original)
        Copy constructor.
        Parameters:
        original - the PropertyValue to copy (never null)
      • PropertyValue

        public PropertyValue​(PropertyValue original,
                             Object newValue)
        Constructor that exposes a new value for an original value holder. The original holder will be exposed as source of the new holder.
        Parameters:
        original - the PropertyValue to link to (never null)
        newValue - the new value to apply
    • Method Detail

      • getValue

        public Object getValue()
        Return the value of the property.

        Note that type conversion will not have occurred here. It is the responsibility of the BeanWrapper implementation to perform type conversion.

      • getOriginalPropertyValue

        public PropertyValue getOriginalPropertyValue()
        Return the original PropertyValue instance for this value holder.
        Returns:
        the original PropertyValue (either a source of this value holder or this value holder itself).
      • setOptional

        public void setOptional​(boolean optional)
        Set whether this is an optional value, that is, to be ignored when no corresponding property exists on the target class.
        Since:
        3.0
      • isOptional

        public boolean isOptional()
        Return whether this is an optional value, that is, to be ignored when no corresponding property exists on the target class.
        Since:
        3.0
      • isConverted

        public boolean isConverted()
        Return whether this holder contains a converted value already (true), or whether the value still needs to be converted (false).
      • setConvertedValue

        public void setConvertedValue​(Object value)
        Set the converted value of the constructor argument, after processed type conversion.
      • getConvertedValue

        public Object getConvertedValue()
        Return the converted value of the constructor argument, after processed type conversion.