public class ToStringRenderer extends AbstractRenderer<java.lang.Object>
Object.toString()
of the object.Constructor and Description |
---|
ToStringRenderer(java.lang.String textForNull)
Constructs a
ToStringRenderer that uses custom textForNull for null
objects. |
Modifier and Type | Method and Description |
---|---|
static ToStringRenderer |
instance()
Returns a
ToStringRenderer that uses empty string for null objects. |
java.lang.String |
render(java.lang.Object object)
Renders
object as plain text. |
render
public ToStringRenderer(java.lang.String textForNull)
ToStringRenderer
that uses custom textForNull
for null
objects.public static ToStringRenderer instance()
ToStringRenderer
that uses empty string for null
objects.public java.lang.String render(java.lang.Object object)
Renderer
object
as plain text. Should never throw any exceptions!