for (final IProcessor processor : this.processors) {
final IProcessorMatcher<? extends Node> processorMatcher = processor.getMatcher();
if (processorMatcher == null) {
throw new ConfigurationException(
"Processor of class \"" + processor.getClass().getName() + "\" " +
"returned null processor matcher.");
}
if (processorMatcher instanceof IElementNameProcessorMatcher) {
// Processor will be indexed as "specific" for one or more element names
final String[] elementNames = ((IElementNameProcessorMatcher) processorMatcher).getElementNames(context);
if (elementNames == null) {
throw new ConfigurationException(
"Processor of class \"" + processor.getClass().getName() + "\" " +
"returned a null element name as a part of its applicability specifications.");
}
for (final String elementName : elementNames) {
Set<ProcessorAndContext> processorsForElementName = newSpecificProcessorsByElementName.get(elementName);
if (processorsForElementName == null) {
processorsForElementName = new HashSet<ProcessorAndContext>(20);
newSpecificProcessorsByElementName.put(elementName, processorsForElementName);
}
processorsForElementName.add(new ProcessorAndContext(processor, context));
}
}
if (processorMatcher instanceof IAttributeNameProcessorMatcher) {
// Processor will be indexed as "specific" for one or more attribute names
final String[] attributeNames = ((IAttributeNameProcessorMatcher) processorMatcher).getAttributeNames(context);
if (attributeNames == null) {
throw new ConfigurationException(
"Processor of class \"" + processor.getClass().getName() + "\" " +
"returned a null attribute name as a part of its applicability specifications.");
}
for (final String attributeName : attributeNames) {