use of org.eclipse.persistence.jaxb.javamodel.JavaPackage in project eclipselink by eclipse-ee4j.
the class AnnotationsProcessor method processPackageLevelAdapters.
/**
* Process any package-level @XmlJavaTypeAdapters.
*/
private void processPackageLevelAdapters(JavaClass javaClass, TypeInfo info) {
JavaPackage pack = javaClass.getPackage();
if (helper.isAnnotationPresent(pack, XmlJavaTypeAdapters.class)) {
XmlJavaTypeAdapters adapters = (XmlJavaTypeAdapters) helper.getAnnotation(pack, XmlJavaTypeAdapters.class);
XmlJavaTypeAdapter[] adapterArray = adapters.value();
for (XmlJavaTypeAdapter next : adapterArray) {
processPackageLevelAdapter(next, info);
}
}
if (helper.isAnnotationPresent(pack, XmlJavaTypeAdapter.class)) {
XmlJavaTypeAdapter adapter = (XmlJavaTypeAdapter) helper.getAnnotation(pack, XmlJavaTypeAdapter.class);
processPackageLevelAdapter(adapter, info);
}
}
use of org.eclipse.persistence.jaxb.javamodel.JavaPackage in project eclipselink by eclipse-ee4j.
the class AnnotationsProcessor method processSchemaTypes.
/**
* Process any @XmlSchemaType(s).
*/
private void processSchemaTypes(JavaClass javaClass, TypeInfo info) {
JavaPackage pack = javaClass.getPackage();
if (helper.isAnnotationPresent(pack, XmlSchemaTypes.class)) {
XmlSchemaTypes types = (XmlSchemaTypes) helper.getAnnotation(pack, XmlSchemaTypes.class);
XmlSchemaType[] typeArray = types.value();
for (XmlSchemaType next : typeArray) {
processSchemaType(next);
}
} else if (helper.isAnnotationPresent(pack, XmlSchemaType.class)) {
processSchemaType((XmlSchemaType) helper.getAnnotation(pack, XmlSchemaType.class));
}
}
Aggregations