Class ClassAttributeSerializer<T,U extends ConfigurationInfo,B extends ConfigurationBuilderInfo>
- java.lang.Object
-
- org.infinispan.commons.configuration.attributes.AttributeSerializer<T,U,B>
-
- org.infinispan.commons.configuration.attributes.ClassAttributeSerializer<T,U,B>
-
public class ClassAttributeSerializer<T,U extends ConfigurationInfo,B extends ConfigurationBuilderInfo> extends AttributeSerializer<T,U,B>
Attribute serializer that converters an instance to its class name when serializing and the other way around when deserializing.- Since:
- 10.0
-
-
Field Summary
Fields Modifier and Type Field Description static AttributeSerializer<Object,ConfigurationInfo,ConfigurationBuilderInfo>
INSTANCE
-
Constructor Summary
Constructors Constructor Description ClassAttributeSerializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getSerializationValue(Attribute<T> attribute, U configurationElement)
Object
readAttributeValue(String enclosingElement, AttributeDefinition attributeDefinition, Object attrValue, B builderInfo)
Read attribute value from serialized format, ifAttributeSerializer.canRead(String, AttributeDefinition)
is true for this instance of serializer.-
Methods inherited from class org.infinispan.commons.configuration.attributes.AttributeSerializer
canRead, getSerializationName
-
-
-
-
Field Detail
-
INSTANCE
public static final AttributeSerializer<Object,ConfigurationInfo,ConfigurationBuilderInfo> INSTANCE
-
-
Method Detail
-
readAttributeValue
public Object readAttributeValue(String enclosingElement, AttributeDefinition attributeDefinition, Object attrValue, B builderInfo)
Description copied from class:AttributeSerializer
Read attribute value from serialized format, ifAttributeSerializer.canRead(String, AttributeDefinition)
is true for this instance of serializer.- Overrides:
readAttributeValue
in classAttributeSerializer<T,U extends ConfigurationInfo,B extends ConfigurationBuilderInfo>
- Parameters:
enclosingElement
- The parent element where the attribute is located.attributeDefinition
- The serialized attribute definition.attrValue
- The serialize attribute value.builderInfo
- theConfigurationBuilderInfo
where the attribute is defined.- Returns:
- The attribute value deserialized.
-
getSerializationValue
public Object getSerializationValue(Attribute<T> attribute, U configurationElement)
- Overrides:
getSerializationValue
in classAttributeSerializer<T,U extends ConfigurationInfo,B extends ConfigurationBuilderInfo>
- Returns:
- The attribute value to be serialized.
-
-