if (value instanceof Class) {
subClassToInstantiate = (Class) value;
isAbstract = Modifier.isAbstract(subClassToInstantiate.getModifiers());
if ((subClassToInstantiate != null) && (!isAbstract)) {
InstantiationPolicy instantiationPolicy = new InstantiationPolicy();
instantiationPolicy.useFactoryInstantiationPolicy(new ConcreteSubclassFactory(subClassToInstantiate), "createConcreteSubclass");
descriptor.setInstantiationPolicy(instantiationPolicy);
break;
}
}
}