TargetViewConfigProvider targetViewConfigProvider =
ClassUtils.tryToInstantiateClass(targetViewConfigProviderClass);
for (Class<? extends ViewConfig> viewConfigRef : targetViewConfigProvider.getTarget(annotation))
{
ViewConfigNode viewConfigNode = findNode(viewConfigRef);
if (viewConfigNode == null)
{
addPageDefinition(viewConfigRef);
viewConfigNode = findNode(viewConfigRef);
if (viewConfigNode == null)
{
throw new IllegalStateException("No node created for: " + viewConfigRef);
}
}
Class<? extends InlineMetaDataTransformer> inlineNodeTransformerClass =
inlineViewMetaData.inlineMetaDataTransformer();
if (!InlineMetaDataTransformer.class.equals(inlineNodeTransformerClass))
{
InlineMetaDataTransformer inlineMetaDataTransformer =
ClassUtils.tryToInstantiateClass(inlineNodeTransformerClass);
viewConfigNode.getInheritedMetaData().add(
inlineMetaDataTransformer.convertToViewMetaData(annotation, configClass));
}
else //no custom transformer registered -> add the annotation itself
{
viewConfigNode.getInheritedMetaData().add(annotation);
}
}
break;
}
}