Lines Matching defs:ipd

37         IndexedPropertyDescriptor ipd = BeanUtils.getIndexedPropertyDescriptor(A.class, "foo");
38 if (!ipd.getIndexedPropertyType().equals(String.class)) {
39 error(ipd, "A.foo should be String type");
56 ipd = BeanUtils.getIndexedPropertyDescriptor(Index.class, "foo");
57 if (!hasIPD(ipd)) {
58 error(pd, "Index.foo should have ipd values");
60 if (hasPD(ipd)) {
61 error(ipd, "Index.foo should not have pd values");
63 ipd = BeanUtils.getIndexedPropertyDescriptor(All.class, "foo");
64 if (!hasPD(ipd) || !hasIPD(ipd)) {
65 error(ipd, "All.foo should have all pd/ipd values");
67 if (!isValidType(ipd)) {
68 error(ipd, "All.foo pdType should equal ipdType");
70 ipd = BeanUtils.getIndexedPropertyDescriptor(Getter.class, "foo");
71 if (ipd.getReadMethod() == null || ipd.getWriteMethod() != null) {
72 error(ipd, "Getter.foo classic methods incorrect");
74 if (!isValidType(ipd)) {
75 error(ipd, "Getter.foo pdType should equal ipdType");
77 ipd = BeanUtils.getIndexedPropertyDescriptor(BadGetter.class, "foo");
78 if (hasPD(ipd)) {
79 error(ipd, "BadGetter.foo should not have classic methods");
81 ipd = BeanUtils.getIndexedPropertyDescriptor(Setter.class, "foo");
82 if (ipd.getReadMethod() != null || ipd.getWriteMethod() == null) {
83 error(ipd, "Setter.foo classic methods incorrect");
85 if (!isValidType(ipd)) {
86 error(ipd, "Setter.foo pdType should equal ipdType");
88 ipd = BeanUtils.getIndexedPropertyDescriptor(BadSetter.class, "foo");
89 if (hasPD(ipd)) {
90 error(ipd, "BadSetter.foo should not have classic methods");
102 public static boolean hasIPD(IndexedPropertyDescriptor ipd) {
103 if (null == ipd.getIndexedPropertyType()) {
106 return (null != ipd.getIndexedReadMethod())
107 || (null != ipd.getIndexedWriteMethod());
110 public static boolean isValidType(IndexedPropertyDescriptor ipd) {
111 Class type = ipd.getPropertyType();
112 return type.isArray() && type.getComponentType().equals(ipd.getIndexedPropertyType());
161 // This class has a complete set of ipd