use of org.eclipse.persistence.jaxb.javamodel.oxm.OXMJavaModelImpl in project eclipselink by eclipse-ee4j.
the class OXMMetadata method getJavaModelInput.
@Override
public JavaModelInput getJavaModelInput() throws JAXBException {
JavaClass[] elinkClasses = createClassModelFromOXM(dynamicClassLoader);
// Use the JavaModel to setup a Generator to generate an EclipseLink project
OXMJavaModelImpl javaModel = new OXMJavaModelImpl(dynamicClassLoader, elinkClasses);
for (JavaClass javaClass : elinkClasses) {
try {
((OXMJavaClassImpl) javaClass).setJavaModel(javaModel);
} catch (ClassCastException cce) {
try {
((OXMObjectFactoryImpl) javaClass).setJavaModel(javaModel);
((OXMObjectFactoryImpl) javaClass).init();
} catch (ClassCastException cce2) {
((JavaClassImpl) javaClass).setJavaModelImpl(javaModel);
}
}
}
return new OXMJavaModelInputImpl(elinkClasses, javaModel);
}
Aggregations