/** * A method which is common to both {@code Marshaller} and {@code Unmarshaller}. * It saves the initial state if it was not already done, but subclasses will * need to complete the work. */ public void setEventHandler(final ValidationEventHandler handler) throws JAXBException { if (!initialProperties.containsKey(ValidationEventHandler.class)) { saveProperty(ValidationEventHandler.class, getEventHandler()); } }
/** * A method which is common to both {@code Marshaller} and {@code Unmarshaller}. * It saves the initial state if it was not already done, but subclasses will * need to complete the work. */ public void setEventHandler(final ValidationEventHandler handler) throws JAXBException { if (!initialProperties.containsKey(ValidationEventHandler.class)) { saveProperty(ValidationEventHandler.class, getEventHandler()); } }
/** * A method which is common to both {@code Marshaller} and {@code Unmarshaller}. * It saves the initial state if it was not already done, but subclasses will * need to complete the work. */ @SuppressWarnings("rawtypes") public <A extends XmlAdapter> void setAdapter(final Class<A> type, final A adapter) { if (!isPropertySaved(type)) { saveProperty(type, getAdapter(type)); } }
/** * A method which is common to both {@code Marshaller} and {@code Unmarshaller}. * It saves the initial state if it was not already done, but subclasses will * need to complete the work. */ public void setSchema(final Schema schema) { if (!isPropertySaved(Schema.class)) { saveProperty(Schema.class, getSchema()); } }
/** * A method which is common to both {@code Marshaller} and {@code Unmarshaller}. * It saves the initial state if it was not already done, but subclasses will * need to complete the work. */ @SuppressWarnings("rawtypes") public <A extends XmlAdapter> void setAdapter(final Class<A> type, final A adapter) { if (!isPropertySaved(type)) { saveProperty(type, getAdapter(type)); } }
/** * A method which is common to both {@code Marshaller} and {@code Unmarshaller}. * It saves the initial state if it was not already done, but subclasses will * need to complete the work. */ public void setSchema(final Schema schema) { if (!isPropertySaved(Schema.class)) { saveProperty(Schema.class, getSchema()); } }