## Uses of Class
java.lang.reflect.Field

- Packages that use Field
  Package | Description
  --- | ---
  java.lang |
  java.lang.invoke |

- - ### Uses of Field in java.lang

    Methods in java.lang that return Field
    Modifier and Type | Method and 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 and 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.

Copyright © 2025 API Design. All Rights Reserved.