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

    • Constructor Detail

      • AttributeSerializer

        public AttributeSerializer()
    • Method Detail

      • canRead

        public boolean canRead​(java.lang.String enclosing,
                               java.lang.String nestingName,
                               java.lang.String nestedName,
                               AttributeDefinition attributeDefinition)
      • getParentElement

        public java.lang.String getParentElement​(U configurationElement)
        Returns the parent element that this attribute should be placed under when serializing, or empty String if the attribute is not nested.
      • getSerializationName

        public java.lang.String getSerializationName​(Attribute<T> attribute,
                                                     U configurationElement)
        Returns:
        The desired serialised attribute name.
      • 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, String, 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.