@Test public void testValidation() throws FileNotFoundException, JAXBException, IOException, SAXException { JAXBContext jaxb = JAXBContext.newInstance(XmlMatrix.class); Matrix m = new Matrix(5, 8); m.set((r, c) -> (r + 1) * (c + 1)); XmlMatrix xmat = XmlMatrix.getAdapter().marshal(m); JAXBSource source = new JAXBSource(jaxb, xmat); Validator validator = Schemas.Core.newValidator(); validator.validate(source); }
public static Adapter getAdapter(){ return ADAPTER; }
XmlMatrix { public static Adapter getAdapter(){ return ADAPTER; } }
XmlMatrix { public static Adapter getAdapter(){ return ADAPTER; }  }
XmlMatrix { public static Adapter getAdapter(){ return ADAPTER; }  int[] getDimensions(); void setDimensions(int[] dimensions); double[] getValues(); void setValues(double[] values); static Adapter getAdapter(); }
XmlMatrix { public static Adapter getAdapter(){ return ADAPTER; }  int[] getDimensions(); void setDimensions(int[] dimensions); double[] getValues(); void setValues(double[] values); static Adapter getAdapter();  }