Class AttributeSerializer<T,​U extends ConfigurationInfo,​B extends ConfigurationBuilderInfo>

    • Constructor Detail

      • AttributeSerializer

        public AttributeSerializer()
    • Method Detail

      • getSerializationName

        public String getSerializationName​(Attribute<T> attribute,
                                           U configurationElement)
        Returns:
        The desired serialised attribute name or null if the attribute name is to be omitted and the value will be written directly
      • getSerializationValue

        public Object getSerializationValue​(Attribute<T> attribute,
                                            U configurationElement)
        Returns:
        The attribute value to be serialized.
      • readAttributeValue

        public Object readAttributeValue​(String enclosingElement,
                                         AttributeDefinition attributeDefinition,
                                         Object attrValue,
                                         B builderInfo)
        Read attribute value from serialized format, if canRead(String, AttributeDefinition) is true for this instance of serializer.
        Parameters:
        enclosingElement - The parent element where the attribute is located.
        attributeDefinition - The serialized attribute definition.
        attrValue - The serialize attribute value.
        builderInfo - the ConfigurationBuilderInfo where the attribute is defined.
        Returns:
        The attribute value deserialized.