Package net.bytebuddy.dynamic
Class Transformer.ForMethod.MethodModifierTransformer
java.lang.Object
net.bytebuddy.dynamic.Transformer.ForMethod.MethodModifierTransformer
- All Implemented Interfaces:
Transformer<MethodDescription.Token>
- Enclosing class:
- Transformer.ForMethod
@Enhance
protected static class Transformer.ForMethod.MethodModifierTransformer
extends Object
implements Transformer<MethodDescription.Token>
A transformer for a method's modifiers.
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.Transformer
Transformer.Compound<S>, Transformer.ForField, Transformer.ForMethod, Transformer.NoOp
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ModifierContributor.Resolver<ModifierContributor.ForMethod>
The resolver to apply onto the method's modifiers. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Creates a new modifier transformation. -
Method Summary
Modifier and TypeMethodDescriptiontransform
(TypeDescription instrumentedType, MethodDescription.Token target) Transforms the supplied target.
-
Field Details
-
resolver
The resolver to apply onto the method's modifiers.
-
-
Constructor Details
-
MethodModifierTransformer
protected MethodModifierTransformer(ModifierContributor.Resolver<ModifierContributor.ForMethod> resolver) Creates a new modifier transformation.- Parameters:
resolver
- The resolver to apply onto the method's modifiers.
-
-
Method Details
-
transform
public MethodDescription.Token transform(TypeDescription instrumentedType, MethodDescription.Token target) Transforms the supplied target.- Specified by:
transform
in interfaceTransformer<MethodDescription.Token>
- Parameters:
instrumentedType
- The instrumented type that declares the target being transformed.target
- The target entity that is being transformed.- Returns:
- The transformed instance.
-