Class PropertyModel

    • Constructor Detail

      • PropertyModel

        public PropertyModel​(PropertyModel a,
                             PropertyModel b)
        Create a new PropertyModel that merges two existing PropertyModel that have identical read/write names. The input PropertyModel objects MUST be equal (a.equals(b) == true)
        Parameters:
        a - a PropertyModel instance to merge
        b - the other PropertyModel instance to merge
      • PropertyModel

        public PropertyModel​(ClassModel classModel,
                             Property property,
                             JsonbContext jsonbContext)
        Creates an instance.
        Parameters:
        classModel - Class model of declaring class.
        property - Property.
        jsonbContext - Context.
    • Method Detail

      • getPropertyDeserializationType

        public Type getPropertyDeserializationType()
        Returns which type should be used to deserialization.
        Returns:
        deserialization type
      • getPropertySerializationType

        public Type getPropertySerializationType()
        Returns which type should be used to serialization.
        Returns:
        serialization type
      • getValue

        public Object getValue​(Object object)
        Gets property's value.
        Parameters:
        object - object to read property from
        Returns:
        property's value
      • setValue

        public void setValue​(Object object,
                             Object value)
        Sets a property. If not writable (final, transient, static), ignores property.
        Parameters:
        object - Object to set value in.
        value - Value to set.
      • isReadable

        public boolean isReadable()
        Property is readable. Based on access policy and java field modifiers.
        Returns:
        true if can be serialized to JSON
      • isWritable

        public boolean isWritable()
        Property is writable. Based on access policy and java field modifiers.
        Returns:
        true if can be deserialized from JSON
      • getPropertyName

        public String getPropertyName()
        Default property name according to Field / Getter / Setter method names. This name is use for identifying properties, for JSON serialization is used customized name which may be derived from default name.
        Returns:
        default name
      • getClassModel

        public ClassModel getClassModel()
        Model of declaring class of this property.
        Returns:
        class model
      • getCustomization

        public PropertyCustomization getCustomization()
        Introspected customization of a property.
        Returns:
        immutable property customization
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getReadName

        public String getReadName()
        Gets a name of JSON document property to read this property from.
        Returns:
        Name of JSON document property.
      • getWriteName

        public String getWriteName()
      • getPropertySerializer

        public javax.json.bind.serializer.JsonbSerializer<?> getPropertySerializer()
        Gets serializer.
        Returns:
        Serializer.
      • getPropagation

        public PropertyValuePropagation getPropagation()
        Wrapper object of java.lang.reflect representations of this javabean property.
        Returns:
        Property model