Package be.apb.gfddpp.common.utils
Class JaxContextCentralizer
- java.lang.Object
-
- be.apb.gfddpp.common.utils.JaxContextCentralizer
-
public class JaxContextCentralizer extends Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddContext(Class<?> clazz)JAXBContextgetContext(Class<?> clazz)static JaxContextCentralizergetInstance()MarshallergetMarshaller(Class<?> clazz)UnmarshallergetUnmarshaller(Class<?> clazz)<X> XtoObject(Class<X> clazz, byte[] data)<X> XtoObject(Class<X> clazz, String data)StringtoXml(Class<?> clazz, Object obj)
-
-
-
Method Detail
-
getInstance
public static JaxContextCentralizer getInstance()
-
addContext
public void addContext(Class<?> clazz) throws RecipeException
- Throws:
RecipeException
-
getContext
public final JAXBContext getContext(Class<?> clazz) throws RecipeException
- Throws:
RecipeException
-
getUnmarshaller
public Unmarshaller getUnmarshaller(Class<?> clazz) throws RecipeException
- Throws:
RecipeException
-
getMarshaller
public Marshaller getMarshaller(Class<?> clazz) throws RecipeException
- Throws:
RecipeException
-
toObject
public <X> X toObject(Class<X> clazz, String data) throws RecipeException
- Throws:
RecipeException
-
toObject
public <X> X toObject(Class<X> clazz, byte[] data) throws RecipeException
- Throws:
RecipeException
-
toXml
public String toXml(Class<?> clazz, Object obj) throws RecipeException
- Throws:
RecipeException
-
-