Class Overview | Class Members | This Package | All Packages
The underlying field's value is obtained as follows:
If the underlying field is a static field, the object argument is ignored; it may be null.
Otherwise, the underlying field is an instance field. If the specified object argument is null, the method throws a NullPointerException. If the specified object is not an instance of the class or interface declaring the underlying field, the method throws an IllegalArgumentException.
If this Field object enforces Java language access control, and the underlying field is inaccessible, the method throws an IllegalAccessException.
Otherwise, the value is retrieved from the underlying instance or static field. If the field has a primitive type, the value is wrapped in an object before being returned, otherwise it is returned as is.