if(visitor instanceof SerializationUnit) {
domSerializationVisitors.addMapping(elementName, resourceConfig, (SerializationUnit) visitor);
logExecutionEvent(resourceConfig, "Added as a DOM " + SerializationUnit.class.getSimpleName() + " resource.");
} else {
Phase phaseAnnotation = visitor.getClass().getAnnotation(Phase.class);
String visitPhase = resourceConfig.getStringParameter("VisitPhase", VisitPhase.PROCESSING.toString());
if(phaseAnnotation != null && phaseAnnotation.value() == VisitPhase.ASSEMBLY) {
// It's an assembly unit...
if(visitor instanceof DOMVisitBefore && VisitorConfigMap.visitBeforeAnnotationsOK(resourceConfig, visitor)) {
domAssemblyVisitBefores.addMapping(elementName, resourceConfig, (DOMVisitBefore) visitor);
}
if(visitor instanceof DOMVisitAfter && VisitorConfigMap.visitAfterAnnotationsOK(resourceConfig, visitor)) {