code: public static List<String> getPropertyNames(Object obj) {
  		List<String> propertyNames = new ArrayList<String>();
  
  		if (obj == null) {
  			return propertyNames;
  		} else {
  			List<Object> cycleDetect = new ArrayList<Object>();
  			performGetPropertyNames(obj, null, propertyNames, cycleDetect);
  			return propertyNames;
  		}
  	}
docs: Recursively gets names of all properties implemented in specified object and
  its subobjects.
  
  The object can be a user defined object, map or array. Returned property name
  correspondently are object properties, map keys or array indexes.
  
  @param obj an objec to introspect.
  @return a list with property names.