Package com.cognitect.transit
Interface WriteHandler<T,Rep>
-
public interface WriteHandler<T,Rep>Converts an instance of an type to a transit representation
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <V> WriteHandler<T,V>getVerboseHandler()Gets an alternative handler which provides more readable representations for use in verbose mode; can return nullReprep(T o)Gets the representation to use for the object, either an instance of transit ground type, or object for which there is a Handler (including an instance of TaggedValue).StringstringRep(T o)Gets the string representation to use for the object; can return nullStringtag(T o)Gets the tag to use for the object
-
-
-
Method Detail
-
rep
Rep rep(T o)
Gets the representation to use for the object, either an instance of transit ground type, or object for which there is a Handler (including an instance of TaggedValue).- Parameters:
o- the object- Returns:
- the representation
-
stringRep
String stringRep(T o)
Gets the string representation to use for the object; can return null- Parameters:
o- the object- Returns:
- the string representation
-
getVerboseHandler
<V> WriteHandler<T,V> getVerboseHandler()
Gets an alternative handler which provides more readable representations for use in verbose mode; can return null- Returns:
- a handler
-
-