Class AttributeSerializer<T,U extends ConfigurationInfo,B extends ConfigurationBuilderInfo>
- java.lang.Object
-
- org.infinispan.commons.configuration.attributes.AttributeSerializer<T,U,B>
-
- Direct Known Subclasses:
ClassAttributeSerializer,DefaultSerializer,NestingAttributeSerializer
public abstract class AttributeSerializer<T,U extends ConfigurationInfo,B extends ConfigurationBuilderInfo> extends java.lang.ObjectHandlesAttributeserialization to external format.- Since:
- 10.0
-
-
Constructor Summary
Constructors Constructor Description AttributeSerializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanRead(java.lang.String enclosing, java.lang.String nestingName, java.lang.String nestedName, AttributeDefinition attributeDefinition)java.lang.StringgetParentElement(U configurationElement)Returns the parent element that this attribute should be placed under when serializing, or empty String if the attribute is not nested.java.lang.StringgetSerializationName(Attribute<T> attribute, U configurationElement)java.lang.ObjectgetSerializationValue(Attribute<T> attribute, U configurationElement)java.lang.ObjectreadAttributeValue(java.lang.String enclosingElement, AttributeDefinition attributeDefinition, java.lang.Object attrValue, B builderInfo)Read attribute value from serialized format, ifcanRead(String, String, String, AttributeDefinition)is true for this instance of serializer.
-
-
-
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, ifcanRead(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- theConfigurationBuilderInfowhere the attribute is defined.- Returns:
- The attribute value deserialized.
-
-