Share this page

# lrapi.lr2.fieldGetter

Example: fieldGetter and fieldSetter | Java over HTTP Vuser Functions

Reflects an object and returns the value of a field.

    public static Object fieldGetter(Object subject, String path) throws IllegalAccessException, NoSuchFieldException, ArrayIndexOutOfBoundsException

## Arguments

Argument | Description
--- | ---
subject | The object to reflect.
path | The path to the array or member.

## Return values

fieldGetter reflects an object and returns the value of a field.

If the path leads to a primitive variable, fieldGetter returns an Object wrapper. For example, `Integer` for int or `Boolean` for boolean.If the path leads to an Object, the function returns the value.

In specifying the path, members from inherited parent classes must be accessed using the `super` keyword. This is different than the default Java behavior, which is to access members directly.

## Parameterization

Parameterization is not applicable to this function.

Tips to improve your search results... VuGen Function Reference Version 25.1-25.3 Function Reference 25.1-25.3 All View Local Help Center View Online Help Center Version: