Package org.apache.camel.spi

Examples of org.apache.camel.spi.Required


          if (propertyDescriptors != null) {
            for (PropertyDescriptor propertyDescriptor : propertyDescriptors) {
              if (propertyName.equals(propertyDescriptor.getName())) {
                Method writeMethod = propertyDescriptor.getWriteMethod();
                if (writeMethod != null) {
                  Required annotation = writeMethod.getAnnotation(Required.class);
                  if (annotation != null) {
                    return true;
                  }
                  if (useMethods) {
                    XmlElement element = writeMethod.getAnnotation(XmlElement.class);
                    if (element != null && element.required()) {
                      return true;
                    }
                    XmlAttribute attribute = writeMethod.getAnnotation(XmlAttribute.class);
                    if (attribute != null && attribute.required()) {
                      return true;
                    }
                  }
                }
                break;
              }
            }
          }
          if (!useMethods) {
            Field[] fields = camelClass.getDeclaredFields();
            for (Field field : fields) {
              if (propertyName.equals(field.getName())) {
                Required annotation = field.getAnnotation(Required.class);
                if (annotation != null) {
                  return true;
                }
                XmlElement element = field.getAnnotation(XmlElement.class);
                if (element != null && element.required()) {
View Full Code Here


          if (propertyDescriptors != null) {
            for (PropertyDescriptor propertyDescriptor : propertyDescriptors) {
              if (propertyName.equals(propertyDescriptor.getName())) {
                Method writeMethod = propertyDescriptor.getWriteMethod();
                if (writeMethod != null) {
                  Required annotation = writeMethod.getAnnotation(Required.class);
                  if (annotation != null) {
                    return true;
                  }
                  if (useMethods) {
                    XmlElement element = writeMethod.getAnnotation(XmlElement.class);
                    if (element != null && element.required()) {
                      return true;
                    }
                    XmlAttribute attribute = writeMethod.getAnnotation(XmlAttribute.class);
                    if (attribute != null && attribute.required()) {
                      return true;
                    }
                  }
                }
                break;
              }
            }
          }
          if (!useMethods) {
            Field[] fields = camelClass.getDeclaredFields();
            for (Field field : fields) {
              if (propertyName.equals(field.getName())) {
                Required annotation = field.getAnnotation(Required.class);
                if (annotation != null) {
                  return true;
                }
                XmlElement element = field.getAnnotation(XmlElement.class);
                if (element != null && element.required()) {
View Full Code Here

TOP

Related Classes of org.apache.camel.spi.Required

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.