use of com.sun.xml.xsom.XSAnnotation in project midpoint by Evolveum.
the class ProcessorUtils method hasAnnotation.
public static BIDeclaration hasAnnotation(ClassOutline classOutline, JFieldVar field, QName qname) {
CPropertyInfo propertyInfo = classOutline.target.getProperty(field.name());
if (propertyInfo == null || !(propertyInfo.getSchemaComponent() instanceof XSParticle)) {
return null;
}
XSParticle particle = (XSParticle) propertyInfo.getSchemaComponent();
if (particle.getTerm() == null) {
return null;
}
XSAnnotation annotation = particle.getTerm().getAnnotation(false);
return hasAnnotation(annotation, qname);
}
Aggregations