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.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.scaffold.InstrumentedType.Prepareable
InstrumentedType.Prepareable.NoOp
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final String
The name prefix of the field to store the instance.private final TypeDescription.Generic
The type of the field.private final String
The name of the field to store the target.private final Object
The target on which the method is to be invoked. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Factory
(Object target, TypeDescription.Generic fieldType) Creates a new target handler for a static field. -
Method Summary
Modifier and TypeMethodDescriptionmake
(Implementation.Target implementationTarget) Creates a target handler for a given implementation target.prepare
(InstrumentedType instrumentedType) Prepares a given instrumented type.
-
Field Details
-
FIELD_PREFIX
The name prefix of the field to store the instance.- See Also:
-
target
The target on which the method is to be invoked. -
fieldType
The type of the field. -
name
The name of the field to store the target.
-
-
Constructor Details
-
Factory
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 Details
-
prepare
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
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.
-