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

    • Constructor Detail

      • AttributeSerializer

        public AttributeSerializer()
    • Method Detail

      • canRead

        public boolean canRead​(java.lang.String name,
                               AttributeDefinition attributeDefinition)
      • getSerializationName

        public java.lang.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 java.lang.Object getSerializationValue​(Attribute<T> attribute,
                                                      U configurationElement)
        Returns:
        The attribute value to be serialized.
      • readAttributeValue

        public java.lang.Object readAttributeValue​(java.lang.String enclosingElement,
                                                   AttributeDefinition attributeDefinition,
                                                   java.lang.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.