Esempio n. 1
0
 public Class<?> getGetterType(String name) {
   PropertyTokenizer prop = new PropertyTokenizer(name);
   if (prop.hasNext()) {
     MetaClass metaProp = metaClassForProperty(prop);
     return metaProp.getGetterType(prop.getChildren());
   } else {
     return getGetterType(prop); // issue #506. Resolve the type inside a Collection Object
   }
 }
Esempio n. 2
0
 public Class<?> getSetterType(String name) {
   PropertyTokenizer prop = new PropertyTokenizer(name);
   if (prop.hasNext()) {
     MetaClass metaProp = metaClassForProperty(prop.getName());
     return metaProp.getSetterType(prop.getChildren());
   } else {
     return reflector.getSetterType(prop.getName());
   }
 }
Esempio n. 3
0
 public boolean hasGetter(String name) {
   PropertyTokenizer prop = new PropertyTokenizer(name);
   if (prop.hasNext()) {
     if (reflector.hasGetter(prop.getName())) {
       MetaClass metaProp = metaClassForProperty(prop);
       return metaProp.hasGetter(prop.getChildren());
     } else {
       return false;
     }
   } else {
     return reflector.hasGetter(prop.getName());
   }
 }
Esempio n. 4
0
 private StringBuilder buildProperty(String name, StringBuilder builder) {
   PropertyTokenizer prop = new PropertyTokenizer(name);
   if (prop.hasNext()) {
     String propertyName = reflector.findPropertyName(prop.getName());
     if (propertyName != null) {
       builder.append(propertyName);
       builder.append(".");
       MetaClass metaProp = metaClassForProperty(propertyName);
       metaProp.buildProperty(prop.getChildren(), builder);
     }
   } else {
     String propertyName = reflector.findPropertyName(name);
     if (propertyName != null) {
       builder.append(propertyName);
     }
   }
   return builder;
 }