public class SerializableDataFormat extends Object implements DataFormat
Constructor and Description |
---|
SerializableDataFormat(String name) |
Modifier and Type | Method and Description |
---|---|
boolean |
canMap(Object value)
Returns true if this data format can map the provided Java Object.
|
String |
getCanonicalTypeName(Object value)
Returns a data-format-specific canonical type name.
|
String |
getName()
Returns the data format name.
|
protected <T> T |
readValue(String value) |
<T> T |
readValue(String value,
Class<T> cls)
Reads the internal representation of a data format to a java object of the
desired class.
|
<T> T |
readValue(String value,
String typeIdentifier)
Reads the internal representation of a data format to a java object of the
desired class.
|
String |
writeValue(Object value)
Writes a java object to a data format's internal data representation.
|
protected String name
public SerializableDataFormat(String name)
public String getName()
DataFormat
getName
in interface DataFormat
public boolean canMap(Object value)
DataFormat
canMap
in interface DataFormat
public String writeValue(Object value)
DataFormat
writeValue
in interface DataFormat
value
- object that is written into internal data representationpublic <T> T readValue(String value, String typeIdentifier)
DataFormat
readValue
in interface DataFormat
value
- the object to be readtypeIdentifier
- the class to map the object topublic <T> T readValue(String value, Class<T> cls)
DataFormat
readValue
in interface DataFormat
value
- the object to be readcls
- a data-format-specific type identifier that describes
the class to map toprotected <T> T readValue(String value)
public String getCanonicalTypeName(Object value)
DataFormat
getCanonicalTypeName
in interface DataFormat
Copyright © 2022. All rights reserved.