Defines a method to access a given field by following the Java bean conventions for getters and setters:
getFoo() will be instrumented to read and return the value of a field foo
or another field if one was specified explicitly. If a property is of type java.lang.Boolean or
boolean, the name isFoo() is also permitted.setFoo(value) will be instrumented to write the given argument value
to a field foo or to another field if one was specified explicitly.
Field accessors always implement a getter if a non-void value is returned from a method and attempt to define a setter
otherwise. If a field accessor is not explicitly defined as a setter via PropertyConfigurable, an instrumented
method must define exactly one parameter. Using the latter API, an explicit parameter index can be defined and a return
value can be specified explicitly when void is not returned.
| Modifier and Type | Class and Description |
|---|---|
| public static interface | FieldAccessor.AssignerConfigurable
A field accessor that can be configured to use a given assigner and runtime type use configuration. |
| protected static interface | FieldAccessor.FieldLocation
A field location represents an identified field description which depends on the instrumented type and method. |
| public static interface | FieldAccessor.FieldNameExtractor
A field name extractor is responsible for determining a field name to a method that is implemented to access this method. |
| protected static class | FieldAccessor.ForImplicitProperty
A field accessor for an implicit property where a getter or setter property is inferred from the signature. |
| protected abstract static class | FieldAccessor.ForSetter<
The type of the value that is initialized per instrumented type. T>A field accessor for a field setter. |
| public static interface | FieldAccessor.OwnerTypeLocatable
A field accessor that can be configured to locate a field in a specific manner. |
| public static interface | FieldAccessor.PropertyConfigurable
A field accessor that allows to define the access to be a field write of a given argument. |
| Modifier and Type | Field and Description |
|---|---|
| protected final Assigner | assigner
The assigner to use. |
| protected final FieldAccessor. | fieldLocation
The field's location. |
| protected final Assigner. | typing
Indicates if dynamic type castings should be attempted for incompatible assignments. |
| Access | Constructor and Description |
|---|---|
| protected | FieldAccessor(FieldAccessor.
The field's location. fieldLocation,The assigner to use. assigner, Assigner.Indicates if dynamic type castings should be attempted for incompatible assignments. typingCreates a new field accessor. |
| Modifier and Type | Method and Description |
|---|---|
| public static FieldAccessor. | Returns: A field accessor using the given field name extractor.The field name extractor to use. fieldNameExtractorDefines a custom strategy for determining the field that is accessed by this field accessor. |
| public static FieldAccessor. | Returns: A field accessor using the given field name extractor.The field name extractors to use in their application order. fieldNameExtractorDefines a custom strategy for determining the field that is accessed by this field accessor. |
| public static FieldAccessor. | Returns: A field accessor using the given field name extractor.The field name extractors to use in their application order. fieldNameExtractors)Defines a custom strategy for determining the field that is accessed by this field accessor. |
| public static FieldAccessor. | |
| public static FieldAccessor. | Returns: A field accessor for the given field.The field being accessed. fieldDescription)Defines a field accessor where the specified field is accessed. |
| public static FieldAccessor. | Returns: A field accessor that follows the Java naming conventions for bean properties.Defines a field accessor where any access is targeted to a field that matches the methods
name with the Java specification for bean properties, i.e. a method |
| public static FieldAccessor. |