docs: @SuppressWarnings("unchecked")
  	public static List<String> getPropertyNames(Object obj) {
  		List<String> properties = new ArrayList<String>();
  
  		if (obj == null) {
  			// Do nothing
  		} else if (obj instanceof Map<?, ?>) {
  			Map<Object, Object> map = (Map<Object, Object>) obj;
  			for (Map.Entry<Object, Object> entry : map.entrySet())
  				properties.add(entry.getKey().toString());
  		} else if (obj instanceof List<?>) {
  			List<Object> list = (List<Object>) obj;
  			for (int index = 0; index < list.size(); index++)
  				properties.add(Integer.toString(index));
  		} else if (obj.getClass().isArray()) {
  			int length = Array.getLength(obj);
  			for (int index = 0; index < length; index++)
  				properties.add(Integer.toString(index));
  		} else {
  			return PropertyReflector.getPropertyNames(obj);
  		}
  
  		return properties;
  	}
  
  	/**
  	 * Get values of all properties in specified object and returns them as a map.
  	 * 
  	 * The object can be a user defined object, map or array. Returned properties
  	 * correspondently are object properties, map key-pairs or array elements with
  	 * their indexes.
  	 * 
  	 * @param obj an object to get properties from.
  	 * @return a map, containing the names of the object's properties and their
  	 *         values.
  	 */
  	@SuppressWarnings("unchecked")
  	public static Map<String, Object> getProperties(Object obj) {
  		Map<String, Object> map = new HashMap<String, Object>();
  
  		if (obj == null) {
  			// Do nothing
  		} else if (obj instanceof Map<?, ?>) {
  			Map<Object, Object> mapObj = (Map<Object, Object>) obj;
  			for (Map.Entry<Object, Object> entry : mapObj.entrySet())
  				map.put(entry.getKey().toString(), entry.getValue());
  		} else if (obj instanceof List<?>) {
  			List<Object> list = (List<Object>) obj;
  			for (int index = 0; index < list.size(); index++)
  				map.put(Integer.toString(index), list.get(index));
  		} else if (obj.getClass().isArray()) {
  			int length = Array.getLength(obj);
  			for (int index = 0; index < length; index++)
  				map.put(Integer.toString(index), Array.get(obj, index));
  		} else {
  			return PropertyReflector.getProperties(obj);
  		}
  
  		return map;
  	}
  }