public class DefaultsCreationPreprocessor extends Object implements DocumentElementPreprocessor.ElementPreprocessor
DefaultsCreationPreprocessor is an DocumentElementPreprocessor.ElementPreprocessor that
creates necessary defaults, like for <serializer>s, if they are missing
from the <defaults> element.| Constructor and Description |
|---|
DefaultsCreationPreprocessor()
Constructs a
DefaultsCreationPreprocessor. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
preprocess(ProcessingContext context,
XmlElement xmlConfig)
Process an
XmlElement, optionally mutating it (or it's children) if required. |
public DefaultsCreationPreprocessor()
DefaultsCreationPreprocessor.public boolean preprocess(ProcessingContext context, XmlElement xmlConfig) throws ConfigurationException
DocumentElementPreprocessor.ElementPreprocessorXmlElement, optionally mutating it (or it's children) if required.
Note: An implementation of this interface should avoid
attempting to traverse child XmlElements. If you wish to
manually traverse or change the entire document, you should instead use
a DocumentPreprocessor.
preprocess in interface DocumentElementPreprocessor.ElementPreprocessorcontext - the ProcessingContext in which the pre-processing is occurringxmlConfig - the XmlElement to preprocesstrue if the specified XmlElement should be
re-preprocessed by this and other DocumentElementPreprocessor.ElementPreprocessors
due to the XmlElement being modified, false
otherwise.ConfigurationException - if during pre-processing of the XmlElement a configuration
issue was discovered (or if pre-processing fails for some reason)