Search in sources :

Example 1 with CTypeInfo

use of com.sun.tools.xjc.model.CTypeInfo in project midpoint by Evolveum.

the class SchemaProcessor method isFieldReference.

private boolean isFieldReference(JFieldVar field, ClassOutline classOutline) {
    CPropertyInfo propertyInfo = classOutline.target.getProperty(field.name());
    Collection<? extends CTypeInfo> collection = propertyInfo.ref();
    if (collection == null || collection.isEmpty()) {
        return false;
    }
    CTypeInfo info = collection.iterator().next();
    if (info instanceof CClassInfo) {
        CClassInfo classInfo = (CClassInfo) info;
        if (OBJECT_REFERENCE_TYPE.equals(classInfo.getTypeName())) {
            return true;
        }
    }
    return false;
}
Also used : CClassInfo(com.sun.tools.xjc.model.CClassInfo) CTypeInfo(com.sun.tools.xjc.model.CTypeInfo) CPropertyInfo(com.sun.tools.xjc.model.CPropertyInfo)

Aggregations

CClassInfo (com.sun.tools.xjc.model.CClassInfo)1 CPropertyInfo (com.sun.tools.xjc.model.CPropertyInfo)1 CTypeInfo (com.sun.tools.xjc.model.CTypeInfo)1