Package net.bytebuddy.implementation
Class MethodCall.TargetHandler.ForValue.Factory
- java.lang.Object
-
- net.bytebuddy.implementation.MethodCall.TargetHandler.ForValue.Factory
-
- All Implemented Interfaces:
InstrumentedType.Prepareable
,MethodCall.TargetHandler.Factory
- Enclosing class:
- MethodCall.TargetHandler.ForValue
@Enhance protected static class MethodCall.TargetHandler.ForValue.Factory extends Object implements MethodCall.TargetHandler.Factory
A factory for a target handler that loads a specific value.
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
Factory(Object target, TypeDescription.Generic fieldType)
Creates a new target handler for a static field.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MethodCall.TargetHandler
make(Implementation.Target implementationTarget)
Creates a target handler for a given implementation target.InstrumentedType
prepare(InstrumentedType instrumentedType)
Prepares a given instrumented type.
-
-
-
Constructor Detail
-
Factory
protected Factory(Object target, TypeDescription.Generic fieldType)
Creates a new target handler for a static field.- Parameters:
target
- The target on which the method is to be invoked.fieldType
- The type of the field.
-
-
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.TargetHandler make(Implementation.Target implementationTarget)
Creates a target handler for a given implementation target.- Specified by:
make
in interfaceMethodCall.TargetHandler.Factory
- Parameters:
implementationTarget
- The implementation target to use.- Returns:
- The target handler to use.
-
-