use of com.canoo.dp.impl.platform.core.IdentitySet in project dolphin-platform by canoo.
the class GarbageCollector method getAllProperties.
private IdentitySet<Property> getAllProperties(Object bean) {
IdentitySet<Property> ret = new IdentitySet<>();
List<Field> fields = propertyFieldCache.get(bean.getClass());
if (fields == null) {
fields = new ArrayList<>();
for (Field field : ReflectionHelper.getInheritedDeclaredFields(bean.getClass())) {
if (Property.class.isAssignableFrom(field.getType())) {
fields.add(field);
}
}
propertyFieldCache.put(bean.getClass(), fields);
}
for (Field field : fields) {
ret.add((Property) ReflectionHelper.getPrivileged(field, bean));
}
return ret;
}
Aggregations