01: package org.objectweb.celtix.bus.jaxws.io;
02:
03: import javax.xml.bind.JAXBContext;
04:
05: import org.objectweb.celtix.bindings.DataBindingCallback.Mode;
06: import org.objectweb.celtix.bus.jaxws.DynamicDataBindingCallback;
07:
08: public class TestDynamicDataBindingCallback extends
09: DynamicDataBindingCallback {
10:
11: private final Class<?>[] clazz;
12: private final JAXBContext context;
13:
14: public TestDynamicDataBindingCallback(Class<?> cls, Mode md) {
15: super (cls, md);
16: clazz = new Class<?>[] { cls };
17: context = null;
18: }
19:
20: public TestDynamicDataBindingCallback(JAXBContext ctx, Mode md) {
21: super (ctx, md);
22: context = ctx;
23: clazz = new Class<?>[] { Object.class };
24: }
25:
26: public Class<?>[] getSupportedFormats() {
27: return clazz;
28: }
29:
30: public JAXBContext getJAXBContext() {
31: return context;
32: }
33:
34: }
|