}
}
private boolean hasSwaRef(JAXBDataBinding db) {
JAXBContext context = db.getContext();
if (context instanceof JAXBContextImpl) {
JAXBContextImpl riCtx = (JAXBContextImpl) context;
try {
// We're using reflection here because this won't work on
// JAXB < 2.0.5 and Java 6 ships with 2.0.2. This means
// SwA won't work correctly unless you're using at least
// JAXB 2.0.5.
Method m = riCtx.getClass().getMethod("hasSwaRef", new Class[0]);
return (Boolean) m.invoke(riCtx, new Object[0]);
} catch (Exception e) {
LOG.log(Level.FINER, "Could not check hasSwaRef", e);
}