Search in sources :

Example 1 with XSParticle

use of com.sun.xml.xsom.XSParticle 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);
}
Also used : XSAnnotation(com.sun.xml.xsom.XSAnnotation) XSParticle(com.sun.xml.xsom.XSParticle) CPropertyInfo(com.sun.tools.xjc.model.CPropertyInfo)

Aggregations

CPropertyInfo (com.sun.tools.xjc.model.CPropertyInfo)1 XSAnnotation (com.sun.xml.xsom.XSAnnotation)1 XSParticle (com.sun.xml.xsom.XSParticle)1