org.sonatype.sisu.goodies.marshal.internal
Class MarshallerSupport
java.lang.Object
org.sonatype.sisu.goodies.common.ComponentSupport
org.sonatype.sisu.goodies.marshal.internal.MarshallerSupport
- All Implemented Interfaces:
- Marshaller
- Direct Known Subclasses:
- JacksonMarshaller, JaxbMarshaller, XstreamMarshaller
public abstract class MarshallerSupport
- extends ComponentSupport
- implements Marshaller
Support for Marshaller
implementations.
- Since:
- 1.0
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MarshallerSupport
public MarshallerSupport()
marshal
public String marshal(Object body)
throws Exception
- Specified by:
marshal
in interface Marshaller
- Throws:
Exception
doMarshal
protected abstract String doMarshal(Object body)
throws Exception
- Throws:
Exception
unmarshal
public <T> T unmarshal(String marshaled,
Class<T> type)
throws Exception
- Specified by:
unmarshal
in interface Marshaller
- Throws:
Exception
unmarshal
public <T> T unmarshal(String marshaled,
com.google.inject.TypeLiteral<T> type)
throws Exception
- Specified by:
unmarshal
in interface Marshaller
- Throws:
Exception
doUnmarshal
protected abstract <T> T doUnmarshal(String marshaled,
Class<T> type)
throws Exception
- Throws:
Exception
Copyright © 2008-2012 Sonatype, Inc.. All Rights Reserved.