Package org.tarantool.facade.annotation

Examples of org.tarantool.facade.annotation.Field


      beanInfo = Introspector.getBeanInfo(cls);
      PropertyDescriptor[] descriptors = beanInfo.getPropertyDescriptors();
      Map<Integer, String> order = new HashMap<Integer, String>();
      int max = 0;
      for (PropertyDescriptor prop : descriptors) {
        Field read = prop.getReadMethod().getAnnotation(Field.class);
        Field write = prop.getReadMethod().getAnnotation(Field.class);
        if (read != null || write != null) {
          int fieldNo = read == null ? write.value() : read.value();
          if (order.put(fieldNo, prop.getName()) != null) {
            throw new IllegalArgumentException(fieldNo + " used more than once in " + cls);
          }
          if (fieldNo < 0) {
            throw new IllegalArgumentException(fieldNo + " should be non negative in " + cls);
View Full Code Here

TOP

Related Classes of org.tarantool.facade.annotation.Field

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.