throw new IllegalArgumentException(
"ClassInfo must have JPAClassNature on it!");
}
if (!Types.isConstructable(classInfo.getDescribedClass(), true)) {
throw new MappingException("mapping.classNotConstructable",
classInfo.getDescribedClass().getName());
}
JPAClassNature nature = new JPAClassNature(classInfo);
ClassDescriptorImpl descriptor = new ClassDescriptorImpl();
descriptor.addNature(ClassDescriptorJDONature.class.getName());
ClassDescriptorJDONature jdoNature = new ClassDescriptorJDONature(
descriptor);
/*
* set classDescriptor infos
*/
/*
* working
*/
descriptor.setJavaClass(classInfo.getDescribedClass());
descriptor.setExtends(null);
Class<?> extendedClass = classInfo.getExtendedClass();
if (extendedClass != null && extendedClass != Object.class) {
ClassDescriptor extendedClassDescriptor = command
.resolve(extendedClass);
if (extendedClassDescriptor == null) {
throw new MappingException("mapping.extendsMissing", classInfo
.getDescribedClass(), extendedClass);
}
descriptor.setExtends(extendedClassDescriptor);
if (extendedClassDescriptor
.hasNature(ClassDescriptorJDONature.class.getName())) {