code: public static boolean hasProperty(Object obj, String name) {
  		if (obj == null)
  			throw new NullPointerException("Object cannot be null");
  		if (name == null)
  			throw new NullPointerException("Property name cannot be null");
  
  		Class<?> objClass = obj.getClass();
  
  		// Search in fields
  		for (Field field : objClass.getFields()) {
  			if (matchField(field, name))
  				return true;
  		}
  
  		// Search in properties
  		name = "get" + name;
  		for (Method method : objClass.getMethods()) {
  			if (matchPropertyGetter(method, name))
  				return true;
  		}
  
  		return false;
  	}
docs: Checks if object has a property with specified name..
  
  @param obj  an object to introspect.
  @param name a name of the property to check.
  @return true if the object has the property and false if it doesn't.