if (property.isSetXmlTransformation()) {
XmlTransformation xmlTransformation = property.getXmlTransformation();
// validate transformer(s)
if (xmlTransformation.isSetXmlReadTransformer()) {
// validate read transformer
XmlReadTransformer readTransformer = xmlTransformation.getXmlReadTransformer();
if (readTransformer.isSetTransformerClass()) {
// handle read transformer class
if (readTransformer.isSetMethod()) {
// cannot have both class and method set
throw JAXBException.readTransformerHasBothClassAndMethod(property.getPropertyName());
}
} else {
// handle read transformer method
if (!readTransformer.isSetMethod()) {
// require class or method to be set
throw JAXBException.readTransformerHasNeitherClassNorMethod(property.getPropertyName());
}
}
}