@HashCodeAndEqualsPlugin.Enhance public static class Advice.Delegator.ForDynamicInvocation extends Object implements Advice.Delegator
Modifier and Type | Class and Description |
---|---|
protected static class |
Advice.Delegator.ForDynamicInvocation.Factory
A factory for creating a dynamic invocation dispatcher.
|
Advice.Delegator.ForDynamicInvocation, Advice.Delegator.ForRegularInvocation
Modifier | Constructor and Description |
---|---|
protected |
ForDynamicInvocation(MethodDescription.InDefinedShape bootstrapMethod,
MethodDescription.SignatureToken signatureToken,
Advice.BootstrapArgumentResolver resolver)
Creates a delegator for a dynamic method invocation.
|
Modifier and Type | Method and Description |
---|---|
StackManipulation |
apply(TypeDescription instrumentedType,
MethodDescription instrumentedMethod)
Materializes an invocation.
|
void |
assertVisibility(TypeDescription instrumentedType)
Asserts the visibility of the delegation target.
|
MethodDescription.TypeToken |
getTypeToken()
Returns the advice method's type token.
|
protected static Advice.Delegator.Factory |
of(MethodDescription.InDefinedShape bootstrapMethod,
Advice.BootstrapArgumentResolver.Factory resolverFactory,
TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> visitor)
Creates a new dynamic invocation delegator.
|
protected ForDynamicInvocation(MethodDescription.InDefinedShape bootstrapMethod, MethodDescription.SignatureToken signatureToken, Advice.BootstrapArgumentResolver resolver)
bootstrapMethod
- The bootstrap method.signatureToken
- The advice method's signature token.resolver
- A resolver to provide the arguments to the bootstrap method.protected static Advice.Delegator.Factory of(MethodDescription.InDefinedShape bootstrapMethod, Advice.BootstrapArgumentResolver.Factory resolverFactory, TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> visitor)
bootstrapMethod
- The bootstrap method or constructor.resolverFactory
- A resolver factory to provide the arguments to the bootstrap method.visitor
- A visitor to apply to the parameter types prior to resolving the MethodType
that is passed to the bootstrap method. The supplied types might not be available
to the instrumented type what might make it necessary to camouflage them to avoid
class loading errors. The actual type should then rather be passed in a different
format by the supplied Advice.BootstrapArgumentResolver
.public StackManipulation apply(TypeDescription instrumentedType, MethodDescription instrumentedMethod)
apply
in interface Advice.Delegator
instrumentedType
- The instrumented type.instrumentedMethod
- The instrumented method.public MethodDescription.TypeToken getTypeToken()
getTypeToken
in interface Advice.Delegator
public void assertVisibility(TypeDescription instrumentedType)
assertVisibility
in interface Advice.Delegator
instrumentedType
- The instrumented type.Copyright © 2014–2025. All rights reserved.