protected static class FieldAccessor.ForImplicitProperty extends FieldAccessor implements FieldAccessor.OwnerTypeLocatable
| Modifier and Type | Class and Description |
|---|---|
protected class |
FieldAccessor.ForImplicitProperty.Appender
An byte code appender for an field accessor implementation.
|
FieldAccessor.AssignerConfigurable, FieldAccessor.FieldLocation, FieldAccessor.FieldNameExtractor, FieldAccessor.ForImplicitProperty, FieldAccessor.ForSetter<T>, FieldAccessor.OwnerTypeLocatable, FieldAccessor.PropertyConfigurableImplementation.Composable, Implementation.Compound, Implementation.Context, Implementation.Simple, Implementation.SpecialMethodInvocation, Implementation.TargetInstrumentedType.Prepareable.NoOpassigner, fieldLocation, typing| Modifier | Constructor and Description |
|---|---|
protected |
ForImplicitProperty(FieldAccessor.FieldLocation fieldLocation)
Creates a field accessor for an implicit property.
|
| Modifier and Type | Method and Description |
|---|---|
ByteCodeAppender |
appender(Implementation.Target implementationTarget)
Creates a byte code appender that determines the implementation of the instrumented type's methods.
|
FieldAccessor.AssignerConfigurable |
in(Class<?> type)
Determines that a field should only be considered when it was defined in a given type.
|
FieldAccessor.AssignerConfigurable |
in(FieldLocator.Factory fieldLocatorFactory)
Determines that a field should only be considered when it was identified by a field locator that is
produced by the given factory.
|
FieldAccessor.AssignerConfigurable |
in(TypeDescription typeDescription)
Determines that a field should only be considered when it was defined in a given type.
|
InstrumentedType |
prepare(InstrumentedType instrumentedType)
Prepares a given instrumented type.
|
Implementation.Composable |
setsArgumentAt(int index)
Defines a setter of the specified parameter for the field being described.
|
Implementation.Composable |
setsDefaultValue()
Defines a setter of the described field's default value, i.e.
|
Implementation.Composable |
setsFieldValueOf(Field field)
Defines a setter of a value that sets another field's value.
|
Implementation.Composable |
setsFieldValueOf(FieldAccessor.FieldNameExtractor fieldNameExtractor)
Defines a setter of a value that sets another field's value.
|
Implementation.Composable |
setsFieldValueOf(FieldDescription fieldDescription)
Defines a setter of a value that sets another field's value.
|
Implementation.Composable |
setsFieldValueOf(String fieldName)
Defines a setter of a value that sets another field's value.
|
Implementation.Composable |
setsReference(Object value)
Defines a setter of a given value for the described field.
|
Implementation.Composable |
setsReference(Object value,
String name)
Defines a setter of a given value for the described field.
|
Implementation.Composable |
setsValue(ConstantValue constant)
Defines a setter of a given constant value for the described field.
|
Implementation.Composable |
setsValue(JavaConstant constant)
Defines a setter of a given constant value for the described field.
|
Implementation.Composable |
setsValue(Object value)
Defines a setter of a given value for the described field.
|
Implementation.Composable |
setsValue(StackManipulation stackManipulation,
Type type)
Defines a setter of a value that is represented by a stack manipulation.
|
Implementation.Composable |
setsValue(StackManipulation stackManipulation,
TypeDescription.Generic typeDescription)
Defines a setter of a value that is represented by a stack manipulation.
|
Implementation.Composable |
setsValue(TypeDescription typeDescription)
Defines a setter of a given class constant value for the described field.
|
FieldAccessor.PropertyConfigurable |
withAssigner(Assigner assigner,
Assigner.Typing typing)
Returns a field accessor that is identical to this field accessor but uses the given assigner
and runtime type use configuration.
|
of, of, of, ofBeanProperty, ofFieldprotected ForImplicitProperty(FieldAccessor.FieldLocation fieldLocation)
fieldLocation - The field's location.public InstrumentedType prepare(InstrumentedType instrumentedType)
prepare in interface InstrumentedType.PrepareableinstrumentedType - The instrumented type in its current form.public ByteCodeAppender appender(Implementation.Target implementationTarget)
appender in interface ImplementationimplementationTarget - The target of the current implementation.InstrumentedType.Prepareable.prepare(InstrumentedType).public Implementation.Composable setsArgumentAt(int index)
Defines a setter of the specified parameter for the field being described.
Note: If the instrumented method does not return void, a chained instrumentation must be supplied.
setsArgumentAt in interface FieldAccessor.PropertyConfigurableindex - The index of the parameter for which to set the field's value.public Implementation.Composable setsDefaultValue()
Defines a setter of the described field's default value, i.e. null or a primitive type's
representation of 0.
Note: If the instrumented method does not return void, a chained instrumentation must be supplied.
setsDefaultValue in interface FieldAccessor.PropertyConfigurablepublic Implementation.Composable setsValue(@MaybeNull Object value)
Defines a setter of a given value for the described field. If the value is a constant value, it will be defined as a constant assignment, otherwise it is defined as a reference value that is stored in a static field of the instrumented type.
Note: If the instrumented method does not return void, a chained instrumentation must be supplied.
setsValue in interface FieldAccessor.PropertyConfigurablevalue - The value to set.public Implementation.Composable setsValue(TypeDescription typeDescription)
Defines a setter of a given class constant value for the described field.
Note: If the instrumented method does not return void, a chained instrumentation must be supplied.
setsValue in interface FieldAccessor.PropertyConfigurabletypeDescription - The type to set to the described field.public Implementation.Composable setsValue(ConstantValue constant)
Defines a setter of a given constant value for the described field.
Note: If the instrumented method does not return void, a chained instrumentation must be supplied.
setsValue in interface FieldAccessor.PropertyConfigurableconstant - The constant to set as a value.public Implementation.Composable setsValue(JavaConstant constant)
Defines a setter of a given constant value for the described field.
Note: If the instrumented method does not return void, a chained instrumentation must be supplied.
setsValue in interface FieldAccessor.PropertyConfigurableconstant - The constant to set as a value.public Implementation.Composable setsValue(StackManipulation stackManipulation, Type type)
Defines a setter of a value that is represented by a stack manipulation.
Note: If the instrumented method does not return void, a chained instrumentation must be supplied.
setsValue in interface FieldAccessor.PropertyConfigurablestackManipulation - A stack manipulation to load the field's value.type - The field value's type.public Implementation.Composable setsValue(StackManipulation stackManipulation, TypeDescription.Generic typeDescription)
Defines a setter of a value that is represented by a stack manipulation.
Note: If the instrumented method does not return void, a chained instrumentation must be supplied.
setsValue in interface FieldAccessor.PropertyConfigurablestackManipulation - A stack manipulation to load the field's value.typeDescription - The field value's type.public Implementation.Composable setsReference(Object value)
Defines a setter of a given value for the described field. The value is kept as a referenced that is stored in a static field of the instrumented type. The field name is chosen based on the value's hash code.
Note: If the instrumented method does not return void, a chained instrumentation must be supplied.
setsReference in interface FieldAccessor.PropertyConfigurablevalue - The value to set.public Implementation.Composable setsReference(Object value, String name)
Defines a setter of a given value for the described field. The value is kept as a referenced that is stored in a static field of the instrumented type.
Note: If the instrumented method does not return void, a chained instrumentation must be supplied.
setsReference in interface FieldAccessor.PropertyConfigurablevalue - The value to set.name - The name of the field.public Implementation.Composable setsFieldValueOf(Field field)
Defines a setter of a value that sets another field's value.
Note: If the instrumented method does not return void, a chained instrumentation must be supplied.
setsFieldValueOf in interface FieldAccessor.PropertyConfigurablefield - The field that holds the value to be set.public Implementation.Composable setsFieldValueOf(FieldDescription fieldDescription)
Defines a setter of a value that sets another field's value.
Note: If the instrumented method does not return void, a chained instrumentation must be supplied.
setsFieldValueOf in interface FieldAccessor.PropertyConfigurablefieldDescription - The field that holds the value to be set.public Implementation.Composable setsFieldValueOf(String fieldName)
Defines a setter of a value that sets another field's value.
Note: If the instrumented method does not return void, a chained instrumentation must be supplied.
setsFieldValueOf in interface FieldAccessor.PropertyConfigurablefieldName - The name of the field that is specified by the instrumented type.public Implementation.Composable setsFieldValueOf(FieldAccessor.FieldNameExtractor fieldNameExtractor)
Defines a setter of a value that sets another field's value.
Note: If the instrumented method does not return void, a chained instrumentation must be supplied.
setsFieldValueOf in interface FieldAccessor.PropertyConfigurablefieldNameExtractor - A field name extractor for the field that is specified by the instrumented type.public FieldAccessor.PropertyConfigurable withAssigner(Assigner assigner, Assigner.Typing typing)
withAssigner in interface FieldAccessor.AssignerConfigurableassigner - The assigner to use.typing - Indicates if dynamic type castings should be attempted for incompatible assignments.public FieldAccessor.AssignerConfigurable in(Class<?> type)
in in interface FieldAccessor.OwnerTypeLocatabletype - The type to be considered.public FieldAccessor.AssignerConfigurable in(TypeDescription typeDescription)
in in interface FieldAccessor.OwnerTypeLocatabletypeDescription - A description of the type to be considered.public FieldAccessor.AssignerConfigurable in(FieldLocator.Factory fieldLocatorFactory)
in in interface FieldAccessor.OwnerTypeLocatablefieldLocatorFactory - A factory that will produce a field locator that will be used to find locate
a field to be accessed.Copyright © 2014–2023. All rights reserved.