Package net.bytebuddy.implementation
Class MethodCall.ArgumentLoader.ForField.Factory
- java.lang.Object
-
- net.bytebuddy.implementation.MethodCall.ArgumentLoader.ForField.Factory
-
- All Implemented Interfaces:
MethodCall.ArgumentLoader.Factory
- Enclosing class:
- MethodCall.ArgumentLoader.ForField
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.
-
-
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 java.util.List<MethodCall.ArgumentLoader>make(TypeDescription instrumentedType, MethodDescription instrumentedMethod, MethodDescription invokedMethod)Creates any number of argument loaders for an instrumentation.InstrumentedTypeprepare(InstrumentedType instrumentedType)Prepares the instrumented type in order to allow the loading of the represented argument.
-
-
-
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)
Description copied from interface:MethodCall.ArgumentLoader.FactoryPrepares the instrumented type in order to allow the loading of the represented argument.- Specified by:
preparein interfaceMethodCall.ArgumentLoader.Factory- Parameters:
instrumentedType- The instrumented type.- Returns:
- The prepared instrumented type.
-
make
public java.util.List<MethodCall.ArgumentLoader> make(TypeDescription instrumentedType, MethodDescription instrumentedMethod, MethodDescription invokedMethod)
Description copied from interface:MethodCall.ArgumentLoader.FactoryCreates any number of argument loaders for an instrumentation.- Specified by:
makein interfaceMethodCall.ArgumentLoader.Factory- Parameters:
instrumentedType- The instrumented type.instrumentedMethod- The instrumented method.invokedMethod- The invoked method.- Returns:
- Any number of argument loaders to supply for the method call.
-
-