if (processorDeclaration.getClassName()
.equals("org.apache.tuscany.sca.assembly.xml.DefaultBeanModelProcessor")) {
// Specific initialization for the DefaultBeanModelProcessor
FactoryExtensionPoint modelFactories =
extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
try {
Class<StAXArtifactProcessor> processorClass =
(Class<StAXArtifactProcessor>)processorDeclaration.loadClass();
Object modelFactory;
if (factoryName != null) {
Class<?> factoryClass = (Class<?>)processorDeclaration.loadClass(factoryName);
modelFactory = modelFactories.getFactory(factoryClass);
} else {
modelFactory = null;
}
Constructor<StAXArtifactProcessor> constructor =
processorClass.getConstructor(FactoryExtensionPoint.class,
QName.class,
Class.class,
Object.class);
processor = constructor.newInstance(modelFactories, artifactType, getModelType(), modelFactory);
} catch (Exception e) {
IllegalStateException ie = new IllegalStateException(e);
throw ie;
}
} else {
FactoryExtensionPoint modelFactories =
extensionPoints.getExtensionPoint(FactoryExtensionPoint.class);
// Load and instantiate the processor class
try {
Class<StAXArtifactProcessor> processorClass =