public class MapMetatype extends AbstractCompositeMetatype
Map
s.
The reference string generated by this metatype converter has two primary
parts. The first part contains "meta" info about the Map
. This
includes the class name followed by the length of the qualified references
for each key and value. The length of a given key must be immediately
followed by the length of the corresponding value. Each element of the meta
info is separated by a delimiter.
The second part is the qualified references for each key and value. The qualified reference for a given key must be immediately followed by the qualified reference for the corresponding value. Each qualified reference is separated by a delimiter.
A "tag" is inserted between the parts to indicate where the qualified references begin.
DELIM, DELIM_LENGTH, ELEMENT_START
Constructor and Description |
---|
MapMetatype()
Constructor
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDisplayName(java.lang.Object dataObject)
Obtain a displayable name that represents the metatype data object.
|
java.lang.String |
getReference(java.lang.Object dataObject)
Return a string representing the data object that can be persisted.
|
java.lang.Object |
resolveReference(java.lang.String refString)
Resolve a string reference back into the corresponding data object.
|
getComposite, getMetatypeHelper
adaptSelection, getEditString, getViewerObject, isMetatypeObject, newMetatypeDataManager, resolveEditString, resolveReference
public java.lang.String getDisplayName(java.lang.Object dataObject)
AbstractMetatype
getDisplayName
in class AbstractMetatype
dataObject
- the metatype data objectAbstractMetatype.getDisplayName(java.lang.Object)
public java.lang.String getReference(java.lang.Object dataObject)
AbstractMetatype
getReference
in class AbstractMetatype
dataObject
- the metatype data object to be persistedAbstractMetatype.getReference(java.lang.Object)
public java.lang.Object resolveReference(java.lang.String refString)
AbstractMetatype
resolveReference
in class AbstractMetatype
refString
- a persistable string that represents the data object