try {
Class<?> readerCls = cl.loadClass(readerClsName);
Class<?> writerCls = cl.loadClass(writerClsName);
final GeneratedReader gr = (GeneratedReader) readerCls.newInstance();
final GeneratedWriter gw = (GeneratedWriter) writerCls.newInstance();
final CompiledContext ctx = this;
this.reader = new Reader(this) {
@Override
public Object read(XoXMLStreamReader xsr, Map<String, Object> properties)
throws Exception {
return gr.read(xsr, ctx);
}
public Object read(XoXMLStreamReader xsr,
Map<String, Object> properties,
QName type)
throws Exception {
return gr.read(xsr, ctx, type);
}
};
this.writer = new Writer(this) {
@Override
public void write(XoXMLStreamWriter xw, Object o, Map<String, Object> properties) throws Exception {
gw.write(xw, ctx, o);
}
};
} catch (Exception e) {