# Uses of Class
java.lang.reflect.Field

Packages that use Field
Package
Description
java.lang
Provides classes that are fundamental to the design of the Java programming language.
java.lang.invoke
The `java.lang.invoke` package provides low-level primitives for interacting with the Java Virtual Machine.
javax.sql.rowset.serial
Provides utility classes to allow serializable mappings between SQL types and data types in the Java programming language.
jdk.dynalink.linker.support
Contains classes that make it more convenient for language runtimes to implement their own language-specific object models and type conversions by providing basic implementations of some classes as well as various utilities.

## Uses of Field in java.lang

Methods in java.lang that return Field
Modifier and Type
Method
Description
`Field`
Class.`getDeclaredField​(String name)`
Returns a `Field` object that reflects the specified declared field of the class or interface represented by this `Class` object.
`Field[]`
Class.`getDeclaredFields()`
Returns an array of `Field` objects reflecting all the fields declared by the class or interface represented by this `Class` object.
`Field`
Class.`getField​(String name)`
Returns a `Field` object that reflects the specified public member field of the class or interface represented by this `Class` object.
`Field[]`
Class.`getFields()`
Returns an array containing `Field` objects reflecting all the accessible public fields of the class or interface represented by this `Class` object.

## Uses of Field in java.lang.invoke

Methods in java.lang.invoke with parameters of type Field
Modifier and Type
Method
Description
`MethodHandle`
MethodHandles.Lookup.`unreflectGetter​(Field f)`
Produces a method handle giving read access to a reflected field.
`MethodHandle`
MethodHandles.Lookup.`unreflectSetter​(Field f)`
Produces a method handle giving write access to a reflected field.
`VarHandle`
MethodHandles.Lookup.`unreflectVarHandle​(Field f)`
Produces a VarHandle giving access to a reflected field `f` of type `T` declared in a class of type `R`.

## Uses of Field in javax.sql.rowset.serial

Methods in javax.sql.rowset.serial that return Field
Modifier and Type
Method
Description
`Field[]`
SerialJavaObject.`getFields()`
Returns an array of `Field` objects that contains each field of the object that this helper class is serializing.

## Uses of Field in jdk.dynalink.linker.support

Methods in jdk.dynalink.linker.support with parameters of type Field
Modifier and Type
Method
Description
`MethodHandle`
Lookup.`unreflectGetter​(Field f)`
Performs a `MethodHandles.Lookup.unreflectGetter(Field)`, converting any encountered `IllegalAccessException` into an `IllegalAccessError`.
`MethodHandle`
Lookup.`unreflectSetter​(Field f)`
Performs a `MethodHandles.Lookup.unreflectSetter(Field)`, converting any encountered `IllegalAccessException` into an `IllegalAccessError`.