public static interface MemberSubstitution.Substitution
Modifier and Type | Interface and Description |
---|---|
static class |
MemberSubstitution.Substitution.Chain
A substitution chain allows for chaining multiple substitution steps for a byte code element being replaced.
|
static interface |
MemberSubstitution.Substitution.Factory
A factory for creating a substitution for an instrumented method.
|
static class |
MemberSubstitution.Substitution.ForFieldAccess
A substitution with a field access.
|
static class |
MemberSubstitution.Substitution.ForMethodInvocation
A substitution with a method invocation.
|
static class |
MemberSubstitution.Substitution.ForValue
A substitution that loads a fixed value.
|
static class |
MemberSubstitution.Substitution.Stubbing
A substitution that drops any field or method access and returns the expected return
type's default value, i.e
null or zero for primitive types. |
Modifier and Type | Method and Description |
---|---|
StackManipulation |
resolve(TypeDescription receiver,
ByteCodeElement.Member original,
TypeList.Generic parameters,
TypeDescription.Generic result,
JavaConstant.MethodHandle methodHandle,
StackManipulation stackManipulation,
int freeOffset)
Resolves this substitution into a stack manipulation.
|
StackManipulation resolve(TypeDescription receiver, ByteCodeElement.Member original, TypeList.Generic parameters, TypeDescription.Generic result, JavaConstant.MethodHandle methodHandle, StackManipulation stackManipulation, int freeOffset)
receiver
- The target type on which a member is accessed.original
- The field, method or constructor that is substituted.parameters
- All parameters that serve as input to this access.result
- The result that is expected from the interaction or void
if no result is expected.methodHandle
- A method handle describing the substituted expression.stackManipulation
- The original byte code expression that is being executed.freeOffset
- The first free offset of the local variable array that can be used for storing values.Copyright © 2014–2024. All rights reserved.