Package | Description |
---|---|
net.bytebuddy.implementation |
The implementation package contains any logic for intercepting method calls.
|
Modifier and Type | Class and Description |
---|---|
static class |
MethodCall.WithoutSpecifiedTarget
Represents a
MethodCall that invokes a method without specifying
an invocation method. |
Modifier and Type | Method and Description |
---|---|
static MethodCall |
MethodCall.construct(Constructor<?> constructor)
Invokes the given constructor in order to create an instance.
|
static MethodCall |
MethodCall.construct(MethodDescription methodDescription)
Invokes the given constructor in order to create an instance.
|
static MethodCall |
MethodCall.invokeSuper()
Invokes the instrumented method as a super method call on the instance itself.
|
MethodCall |
MethodCall.WithoutSpecifiedTarget.on(Object target)
Invokes the specified method on the given instance.
|
MethodCall |
MethodCall.WithoutSpecifiedTarget.on(StackManipulation stackManipulation,
Class<?> type)
Invokes the specified method on an instance that is loaded by the provided stack manipulation.
|
MethodCall |
MethodCall.WithoutSpecifiedTarget.on(StackManipulation stackManipulation,
TypeDescription typeDescription)
Invokes the specified method on an instance that is loaded by the provided stack manipulation.
|
<T> MethodCall |
MethodCall.WithoutSpecifiedTarget.on(T target,
Class<? super T> type)
Invokes the specified method on the given instance.
|
MethodCall |
MethodCall.WithoutSpecifiedTarget.onArgument(int index)
Invokes the specified method on the instrumented method's argument of the given index.
|
MethodCall |
MethodCall.WithoutSpecifiedTarget.onDefault()
Invokes the given method by a Java 8 default method invocation on the instance of the instrumented type.
|
MethodCall |
MethodCall.WithoutSpecifiedTarget.onField(Field field)
Invokes a method on the object stored in the specified field.
|
MethodCall |
MethodCall.WithoutSpecifiedTarget.onField(FieldDescription fieldDescription)
Invokes a method on the object stored in the specified field.
|
MethodCall |
MethodCall.WithoutSpecifiedTarget.onField(String name)
Invokes a method on the object stored in the specified field.
|
MethodCall |
MethodCall.WithoutSpecifiedTarget.onField(String name,
FieldLocator.Factory fieldLocatorFactory)
Invokes a method on the object stored in the specified field.
|
MethodCall |
MethodCall.WithoutSpecifiedTarget.onMethodCall(MethodCall methodCall)
Invokes a method on the method call's return value.
|
MethodCall |
MethodCall.WithoutSpecifiedTarget.onSuper()
Invokes the given method by a super method invocation on the instance of the instrumented type.
|
MethodCall |
MethodCall.with(ConstantValue... constant)
Defines the given Java instances to be provided as arguments to the invoked method where the given
instances are stored in the generated class's constant pool.
|
MethodCall |
MethodCall.with(EnumerationDescription... enumerationDescription)
Defines the given enumeration values to be provided as arguments to the invoked method where the values
are read from the enumeration class on demand.
|
MethodCall |
MethodCall.with(JavaConstant... constant)
Defines the given Java instances to be provided as arguments to the invoked method where the given
instances are stored in the generated class's constant pool.
|
MethodCall |
MethodCall.with(List<? extends MethodCall.ArgumentLoader.Factory> argumentLoaders)
Defines a method call that resolves arguments by the supplied argument loader factories.
|
MethodCall |
MethodCall.with(MethodCall.ArgumentLoader.Factory... argumentLoader)
Defines a method call that resolves arguments by the supplied argument loader factories.
|
MethodCall |
MethodCall.with(Object... argument)
Defines a number of arguments to be handed to the method that is being invoked by this implementation.
|
MethodCall |
MethodCall.with(StackManipulation stackManipulation,
Type type)
Adds a stack manipulation as an assignment to the next parameter.
|
MethodCall |
MethodCall.with(StackManipulation stackManipulation,
TypeDefinition typeDefinition)
Adds a stack manipulation as an assignment to the next parameter.
|
MethodCall |
MethodCall.with(TypeDescription... typeDescription)
Defines the given types to be provided as arguments to the invoked method where the represented types
are stored in the generated class's constant pool.
|
MethodCall |
MethodCall.withAllArguments()
Adds all arguments of the instrumented method as arguments to the invoked method to this method call.
|
MethodCall |
MethodCall.withArgument(int... index)
Defines a number of arguments of the instrumented method by their parameter indices to be handed
to the invoked method as an argument.
|
MethodCall |
MethodCall.withArgumentArray()
Adds an array containing all arguments of the instrumented method to this method call.
|
MethodCall |
MethodCall.withArgumentArrayElements(int index)
Creates a method call where the parameter with
index is expected to be an array and where each element of the array
is expected to represent an argument for the method being invoked. |
MethodCall |
MethodCall.withArgumentArrayElements(int index,
int size)
Creates a method call where the parameter with
index is expected to be an array and where size elements are loaded
from the array as arguments for the invoked method. |
MethodCall |
MethodCall.withArgumentArrayElements(int index,
int start,
int size)
Creates a method call where the parameter with
index is expected to be an array and where size elements are loaded
from the array as arguments for the invoked method. |
MethodCall |
MethodCall.withField(FieldLocator.Factory fieldLocatorFactory,
String... name)
Defines a method call which fetches a value from a list of existing fields.
|
MethodCall |
MethodCall.withField(String... name)
Defines a method call which fetches a value from a list of existing fields.
|
MethodCall |
MethodCall.withMethodCall(MethodCall methodCall)
Defines a method call which fetches a value from a method call.
|
MethodCall |
MethodCall.withOwnType()
Assigns the
Class value of the instrumented type. |
MethodCall |
MethodCall.withReference(Object... argument)
Defines a number of arguments to be handed to the method that is being invoked by this implementation.
|
MethodCall |
MethodCall.withThis()
Assigns the
this reference to the next parameter. |
Modifier and Type | Method and Description |
---|---|
MethodCall |
MethodCall.WithoutSpecifiedTarget.onMethodCall(MethodCall methodCall)
Invokes a method on the method call's return value.
|
MethodCall |
MethodCall.withMethodCall(MethodCall methodCall)
Defines a method call which fetches a value from a method call.
|
Constructor and Description |
---|
Factory(MethodCall methodCall)
Creates a new argument loader for an existing method call.
|
Factory(MethodCall methodCall)
Creates a new factory for invoking another method call as a method target.
|
FieldSetting(MethodCall methodCall)
Creates a new field setting method call.
|
Copyright © 2014–2023. All rights reserved.