Returns a Field
object that reflects the specified public member
field of the class or interface represented by this Class
object. The name
parameter is a String
specifying the
simple name of the desired field.
The field to be reflected is determined by the algorithm that follows. Let C be the class or interface represented by this object:
NoSuchFieldException
is thrown. If this Class
object represents an array type, then this
method does not find the length
field of the array type.
name | the field name |
Field
object of this class specified by
name
NoSuchFieldException | if a field with the specified name is not found. | |
NullPointerException | if name is null | |
SecurityException
| If a security manager, s, is present and
the caller's class loader is not the same as or an
ancestor of the class loader for the current class and
invocation of s.checkPackageAccess() denies access to the package
of this class. |
@jls 8.2 Class Members
@jls 8.3 Field Declarations
Diagram: Class, Package, Module