public boolean isIncluded(BeanProperty prop) { PathExpression expression= matches(pathExpressions); if (expression != null) { return expression.isIncluded(); } Boolean annotation= prop.isAnnotated(); if (annotation != null) { return annotation; } if (serializationType == SerializationType.SHALLOW) { Class propType= prop.getPropertyType(); return !(propType.isArray() || Iterable.class.isAssignableFrom(propType)); } else { return true; } }
public Boolean isReadable() { Method rm= getReadMethod(); return rm != null && !Modifier.isStatic(rm.getModifiers()) || property != null && !Modifier.isStatic(property.getModifiers()) && !Modifier.isTransient(property.getModifiers()); }
if (!properties.containsKey(property)) properties.put(property, new BeanProperty(property, this)); properties.get(property).setReadMethod(method); if (!properties.containsKey(property)) properties.put(property, new BeanProperty(property, this)); properties.get(property).setReadMethod(method); if (!properties.containsKey(property)) properties.put(property, new BeanProperty(property, this)); properties.get(property).addWriteMethod(method); if (!properties.containsKey(publicProperties.getName())) properties.put(publicProperties.getName(), new BeanProperty(publicProperties, this));
if (value != null) currentPath.enqueue(descriptor.getName()); Method setMethod= descriptor.getWriteMethod(); if (setMethod != null) Field field= descriptor.getProperty(); if (field != null)
public Boolean isWritable() { Method wm= getWriteMethod(); return wm != null && Modifier.isPublic(wm.getModifiers()) || property != null && Modifier.isPublic(property.getModifiers()) && !Modifier.isTransient(property.getModifiers()); } }
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; }
public Object getValue(Object instance) throws InvocationTargetException, IllegalAccessException { Method rm= getReadMethod(); if (rm != null) { return rm.invoke(instance, (Object[]) null); } else if (property != null) { return property.get(instance); } else { return null; } }
public Boolean isAnnotated() { Method rm= getReadMethod(); if (rm != null) { if (rm.isAnnotationPresent(JSON.class)) { return rm.getAnnotation(JSON.class).include(); } } else if (property != null) { if (property.isAnnotationPresent(JSON.class)) { return property.getAnnotation(JSON.class).include(); } } return null; }
public Method getReadMethod() { if (readMethod == null && bean.getSuperBean() != null && bean.getSuperBean().hasProperty(name)) { return bean.getSuperBean().getProperty(name).getReadMethod(); } else { return readMethod; } }