protected BeanAnalyzer(Class clazz) { this.clazz2= clazz; superBean= analyze(clazz.getSuperclass()); populateProperties(); }
public BeanProperty(String name, BeanAnalyzer bean) { this.name= name; this.bean= bean; this.property= bean.getDeclaredField(name); }
public Method getReadMethod() { if (readMethod == null && bean.getSuperBean() != null && bean.getSuperBean().hasProperty(name)) { return bean.getSuperBean().getProperty(name).getReadMethod(); } else { return readMethod; } }
BeanAnalyzer analyzer= BeanAnalyzer.analyze(target.getClass()); for (BeanProperty descriptor : analyzer.getProperties())
public Collection<BeanProperty> getProperties() { Map<String, BeanProperty> properties= new HashMap<String, BeanProperty>(this.properties); BeanAnalyzer current= this.superBean; while (current != null) { merge(properties, current.properties); current= current.superBean; } return properties.values(); }
public static BeanAnalyzer analyze(Class clazz2) { if (cache.get() == null) cache.set(new HashMap<Class, BeanAnalyzer>()); if (clazz2 == null) return null; if (!cache.get().containsKey(clazz2)) { cache.get().put(clazz2, new BeanAnalyzer(clazz2)); } return cache.get().get(clazz2); }
String property= uncapitalize(name.substring(3)); if (!properties.containsKey(property)) String property= uncapitalize(name.substring(2)); if (!properties.containsKey(property)) String property= uncapitalize(name.substring(3)); if (!properties.containsKey(property))
context.getVisits().add(object); BeanAnalyzer analyzer= BeanAnalyzer.analyze(resolveClass(object)); TypeContext typeContext= context.writeOpenObject(); for (BeanProperty prop : analyzer.getProperties())
public Method getWriteMethod() { if (writeMethod == null) { writeMethod= writeMethods.get(propertyType); if (writeMethod == null && bean.getSuperBean() != null && bean.getSuperBean().hasProperty(name)) { return bean.getSuperBean().getProperty(name).getWriteMethod(); } } return writeMethod; }