Package net.bytebuddy.implementation
Class MethodCall.ArgumentLoader.ForField.Factory
- java.lang.Object
-
- net.bytebuddy.implementation.MethodCall.ArgumentLoader.ForField.Factory
-
- All Implemented Interfaces:
InstrumentedType.Prepareable
,MethodCall.ArgumentLoader.Factory
- Enclosing class:
- MethodCall.ArgumentLoader.ForField
@Enhance protected static class MethodCall.ArgumentLoader.ForField.Factory extends java.lang.Object implements MethodCall.ArgumentLoader.Factory
A factory for an argument loaded that loads the value of an existing field as an argument.
-
-
Field Summary
Fields Modifier and Type Field Description private FieldLocator.Factory
fieldLocatorFactory
The field locator to use.private java.lang.String
name
The name of the field.
-
Constructor Summary
Constructors Constructor Description Factory(java.lang.String name, FieldLocator.Factory fieldLocatorFactory)
Creates a new argument loader for an existing field.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MethodCall.ArgumentLoader.ArgumentProvider
make(Implementation.Target implementationTarget)
Creates an argument provider for the supplied implementation target.InstrumentedType
prepare(InstrumentedType instrumentedType)
Prepares a given instrumented type.
-
-
-
Field Detail
-
name
private final java.lang.String name
The name of the field.
-
fieldLocatorFactory
private final FieldLocator.Factory fieldLocatorFactory
The field locator to use.
-
-
Constructor Detail
-
Factory
public Factory(java.lang.String name, FieldLocator.Factory fieldLocatorFactory)
Creates a new argument loader for an existing field.- Parameters:
name
- The name of the field.fieldLocatorFactory
- The field locator to use.
-
-
Method Detail
-
prepare
public InstrumentedType prepare(InstrumentedType instrumentedType)
Prepares a given instrumented type.- Specified by:
prepare
in interfaceInstrumentedType.Prepareable
- Parameters:
instrumentedType
- The instrumented type in its current form.- Returns:
- The prepared instrumented type.
-
make
public MethodCall.ArgumentLoader.ArgumentProvider make(Implementation.Target implementationTarget)
Creates an argument provider for the supplied implementation target.- Specified by:
make
in interfaceMethodCall.ArgumentLoader.Factory
- Parameters:
implementationTarget
- The implementation target to use.- Returns:
- An appropriate argument provider.
-
-