public interface ValueDisplayer extends ValueCoder
An extension of ValueCoder
that adds the display(com.persistit.Value, java.lang.StringBuilder, java.lang.Class<?>, com.persistit.encoding.CoderContext)
method.
This method populates a supplied StringBuilder
with a
displayable, human-readable representation of the Object value that was
formerly written to a Value
by this ValueDisplayer
.
The toString
method and
decodeDisplayable
methods of Value
preferentially use the registered
ValueDisplayer
, if present, to generate a String representation
of an object value encoded in a Value
.
Modifier and Type | Method and Description |
---|---|
void |
display(Value value,
StringBuilder target,
Class<?> clazz,
CoderContext context)
Writes a String representation of the value into a supplied
StringBuilder . |
get, put
void display(Value value, StringBuilder target, Class<?> clazz, CoderContext context) throws ConversionException
Writes a String representation of the value into a supplied
StringBuilder
. This is used in utility programs to display
stored content without actually deserialized Objects represented by the
value.
This method will be called only if this ValueDisplayer
has
been registered with the current CoderManager
to encode objects
having the supplied Class
value. Persistit will never call
this method to decode a value that was null
when written
because null values are handled by built-in encoding logic.
value
- The Value
from which interior fields of the
object are to be retrievedtarget
- The StringBuilder
into which the decoded value is
to be writtenclazz
- The class of the object that was originally encoded into
Value.context
- An arbitrary object that can optionally be supplied by the
application to convey an application-specific context for the
operation. (See CoderContext
.) The default value is
null
.ConversionException
Copyright © 2025 Open Identity Platform Community. All rights reserved.