Search in sources :

Example 6 with XmlElementRef

use of javax.xml.bind.annotation.XmlElementRef in project midpoint by Evolveum.

the class PrismBeanInspector method lookupSubstitutionUncached.

private Field lookupSubstitutionUncached(Class beanClass, Method elementMethodInObjectFactory) {
    XmlElementDecl xmlElementDecl = elementMethodInObjectFactory.getAnnotation(XmlElementDecl.class);
    if (xmlElementDecl == null) {
        return null;
    }
    final String substitutionHeadName = xmlElementDecl.substitutionHeadName();
    return findField(beanClass, field -> {
        XmlElementRef xmlElementRef = field.getAnnotation(XmlElementRef.class);
        return xmlElementRef != null && xmlElementRef.name().equals(substitutionHeadName);
    });
}
Also used : XmlElementRef(javax.xml.bind.annotation.XmlElementRef) XmlElementDecl(javax.xml.bind.annotation.XmlElementDecl)

Aggregations

XmlElementRef (javax.xml.bind.annotation.XmlElementRef)6 XmlElement (javax.xml.bind.annotation.XmlElement)5 XmlAttribute (javax.xml.bind.annotation.XmlAttribute)4 XmlElements (javax.xml.bind.annotation.XmlElements)4 TypeElement (javax.lang.model.element.TypeElement)2 VariableElement (javax.lang.model.element.VariableElement)2 TypeMirror (javax.lang.model.type.TypeMirror)2 XmlElementRefs (javax.xml.bind.annotation.XmlElementRefs)2 XmlValue (javax.xml.bind.annotation.XmlValue)2 AnnotationProcessorHelper.findTypeElement (org.apache.camel.tools.apt.AnnotationProcessorHelper.findTypeElement)2 ZimbraJsonArrayForWrapper (com.zimbra.soap.json.jackson.annotate.ZimbraJsonArrayForWrapper)1 ZimbraJsonAttribute (com.zimbra.soap.json.jackson.annotate.ZimbraJsonAttribute)1 ZimbraKeyValuePairs (com.zimbra.soap.json.jackson.annotate.ZimbraKeyValuePairs)1 ZimbraUniqueElement (com.zimbra.soap.json.jackson.annotate.ZimbraUniqueElement)1 Annotation (java.lang.annotation.Annotation)1 Field (java.lang.reflect.Field)1 Method (java.lang.reflect.Method)1 XmlAnyAttribute (javax.xml.bind.annotation.XmlAnyAttribute)1 XmlAnyElement (javax.xml.bind.annotation.XmlAnyElement)1 XmlElementDecl (javax.xml.bind.annotation.XmlElementDecl)1