@HashCodeAndEqualsPlugin.Enhance public static class Transformer.ForMethod extends Object implements Transformer<MethodDescription>
MethodDescription.Token.| Modifier and Type | Class and Description |
|---|---|
protected static class |
Transformer.ForMethod.MethodModifierTransformer
A transformer for a method's modifiers.
|
protected static class |
Transformer.ForMethod.TransformedMethod
The transformed method.
|
Transformer.Compound<S>, Transformer.ForField, Transformer.ForMethod, Transformer.NoOp| Constructor and Description |
|---|
ForMethod(Transformer<MethodDescription.Token> transformer)
Creates a new transforming method transformer.
|
| Modifier and Type | Method and Description |
|---|---|
MethodDescription |
transform(TypeDescription instrumentedType,
MethodDescription methodDescription)
Transforms the supplied target.
|
static Transformer<MethodDescription> |
withModifiers(List<? extends ModifierContributor.ForMethod> modifierContributors)
Creates a transformer that enforces the supplied modifier contributors.
|
static Transformer<MethodDescription> |
withModifiers(ModifierContributor.ForMethod... modifierContributor)
Creates a transformer that enforces the supplied modifier contributors.
|
public ForMethod(Transformer<MethodDescription.Token> transformer)
transformer - The transformer to be applied.public static Transformer<MethodDescription> withModifiers(ModifierContributor.ForMethod... modifierContributor)
modifierContributor - The modifier transformers in their application order.public static Transformer<MethodDescription> withModifiers(List<? extends ModifierContributor.ForMethod> modifierContributors)
modifierContributors - The modifier contributors in their application order.public MethodDescription transform(TypeDescription instrumentedType, MethodDescription methodDescription)
transform in interface Transformer<MethodDescription>instrumentedType - The instrumented type that declares the target being transformed.methodDescription - The target entity that is being transformed.Copyright © 2014–2025. All rights reserved.