}
public Set<String> getPropertyNames(Object obj) {
Set<String> included = new HashSet<String>();
boolean defaultInclude = false;
SpringDescribe classAnnotation = (SpringDescribe) obj.getClass().getAnnotation(SpringDescribe.class);
if (classAnnotation != null)
defaultInclude = classAnnotation.included();
// look for getters
Method[] methods = obj.getClass().getMethods();
for (Method method : methods) {
if (method.getName().equals("getClass"))
continue;
boolean methodInclude = defaultInclude;
String methodName = method.getName();
if (!isValidGetter(method))
continue;
if (!existsSetterForGetter(method, obj.getClass()))
continue;
SpringDescribe annotation = (SpringDescribe) method.getAnnotation(SpringDescribe.class);
if (annotation != null)
methodInclude = annotation.included();
if (!methodInclude)
continue;
String propertyName;
if (methodName.startsWith("get"))
propertyName = methodName.substring(3); // getXXX