Package net.bytebuddy.implementation
Class MethodCall.ArgumentLoader.ForInstance.Factory
- java.lang.Object
-
- net.bytebuddy.implementation.MethodCall.ArgumentLoader.ForInstance.Factory
-
- All Implemented Interfaces:
InstrumentedType.Prepareable,MethodCall.ArgumentLoader.Factory
- Enclosing class:
- MethodCall.ArgumentLoader.ForInstance
@Enhance protected static class MethodCall.ArgumentLoader.ForInstance.Factory extends java.lang.Object implements MethodCall.ArgumentLoader.Factory
A factory that supplies the value of a static field as an argument.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.scaffold.InstrumentedType.Prepareable
InstrumentedType.Prepareable.NoOp
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringFIELD_PREFIXThe name prefix of the field to store the argument.private java.lang.StringnameThe name of the field.private java.lang.ObjectvalueThe value to be stored in the field.
-
Constructor Summary
Constructors Constructor Description Factory(java.lang.Object value)Creates a factory that loads the value of a static field as an argument.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MethodCall.ArgumentLoader.ArgumentProvidermake(Implementation.Target implementationTarget)Creates an argument provider for the supplied implementation target.InstrumentedTypeprepare(InstrumentedType instrumentedType)Prepares a given instrumented type.
-
-
-
Field Detail
-
FIELD_PREFIX
private static final java.lang.String FIELD_PREFIX
The name prefix of the field to store the argument.- See Also:
- Constant Field Values
-
value
private final java.lang.Object value
The value to be stored in the field.
-
name
@ValueHandling(IGNORE) private final java.lang.String name
The name of the field.
-
-
Method Detail
-
prepare
public InstrumentedType prepare(InstrumentedType instrumentedType)
Prepares a given instrumented type.- Specified by:
preparein 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:
makein interfaceMethodCall.ArgumentLoader.Factory- Parameters:
implementationTarget- The implementation target to use.- Returns:
- An appropriate argument provider.
-
-