org.glassfish.tyrus
Class ToStringEncoder
java.lang.Object
org.glassfish.tyrus.ToStringEncoder
- All Implemented Interfaces:
- Encoder, Encoder.Text<Object>
public class ToStringEncoder
- extends Object
- implements Encoder.Text<Object>
Fall-back encoder - encoders any object to string using Object.toString() method.
- Author:
- Martin Matula (martin.matula at oracle.com)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INSTANCE
public static ToStringEncoder INSTANCE
ToStringEncoder
public ToStringEncoder()
encode
public String encode(Object object)
throws EncodeException
- Description copied from interface:
Encoder.Text
- Encode the given object into a String.
- Specified by:
encode in interface Encoder.Text<Object>
- Parameters:
object - the object being encoded.
- Returns:
- the encoded object as a string.
- Throws:
EncodeException
Copyright © 2012. All Rights Reserved.