| Package | Description |
|---|---|
| net.bytebuddy.agent.builder |
An agent builder is used to easily implement load-time class-transformations using a Java agent.
|
| net.bytebuddy.asm |
The ASM package contains classes that are meant for direct interaction with the ASM API.
|
| net.bytebuddy.implementation.bytecode.constant |
StackManipulations in this package are responsible for
creating compile-time constants and pushing them onto the operand stack. |
| net.bytebuddy.implementation.bytecode.member |
StackManipulations of this package are responsible for
accessing type or method members, i.e. |
| net.bytebuddy.utility |
This package contains utility classes for common use within any Byte Buddy logic.
|
| Modifier and Type | Method and Description |
|---|---|
protected static ByteCodeAppender |
AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.LambdaMethodImplementation.Appender.of(MethodDescription targetMethod,
JavaConstant.MethodType specializedLambdaMethod,
List<FieldDescription.InDefinedShape> declaredFields,
JavaConstant.MethodHandle.HandleType handleType,
TypeDescription targetType)
Resolves an appropriate appender for this lambda expression.
|
| Constructor and Description |
|---|
Appender(MethodDescription targetMethod,
JavaConstant.MethodType specializedLambdaMethod,
List<FieldDescription.InDefinedShape> declaredFields,
AgentBuilder.LambdaInstrumentationStrategy.LambdaInstanceFactory.LambdaMethodImplementation.Appender.Dispatcher dispatcher)
Creates an appender of a lambda expression's functional method.
|
BridgeMethodImplementation(String lambdaMethodName,
JavaConstant.MethodType lambdaMethod)
Creates a new bridge method implementation for a lambda expression.
|
LambdaMethodImplementation(TypeDescription targetType,
JavaConstant.MethodHandle targetMethod,
JavaConstant.MethodType specializedLambdaMethod)
Creates a implementation of a lambda expression's functional method.
|
SerializationImplementation(TypeDescription targetType,
TypeDescription lambdaType,
String lambdaMethodName,
JavaConstant.MethodType lambdaMethod,
JavaConstant.MethodHandle targetMethod,
JavaConstant.MethodType specializedMethod)
Creates a new implementation for a serializable's lambda expression's
writeReplace method. |
| Modifier and Type | Method and Description |
|---|---|
JavaConstant.MethodType |
MemberSubstitution.Target.ForDynamicInvocation.getMethodType()
Returns the requested type of the target for the invokedynamic instruction.
|
| Modifier and Type | Method and Description |
|---|---|
MemberSubstitution.Replacement.Binding |
MemberSubstitution.Replacement.bind(TypeDescription instrumentedType,
MethodDescription instrumentedMethod,
JavaConstant.MethodHandle methodHandle,
JavaConstant.MethodType methodType,
String name,
List<JavaConstant> constants)
Binds this replacement for a dynamic method invocation that was discovered.
|
MemberSubstitution.Replacement.Binding |
MemberSubstitution.Replacement.NoOp.bind(TypeDescription instrumentedType,
MethodDescription instrumentedMethod,
JavaConstant.MethodHandle methodHandle,
JavaConstant.MethodType methodType,
String name,
List<JavaConstant> constants)
Binds this replacement for a dynamic method invocation that was discovered.
|
MemberSubstitution.Replacement.Binding |
MemberSubstitution.Replacement.ForElementMatchers.bind(TypeDescription instrumentedType,
MethodDescription instrumentedMethod,
JavaConstant.MethodHandle methodHandle,
JavaConstant.MethodType methodType,
String name,
List<JavaConstant> constants)
Binds this replacement for a dynamic method invocation that was discovered.
|
MemberSubstitution.Replacement.Binding |
MemberSubstitution.Replacement.ForDynamicInvocation.bind(TypeDescription instrumentedType,
MethodDescription instrumentedMethod,
JavaConstant.MethodHandle methodHandle,
JavaConstant.MethodType methodType,
String name,
List<JavaConstant> constants)
Binds this replacement for a dynamic method invocation that was discovered.
|
MemberSubstitution.Replacement.Binding |
MemberSubstitution.Replacement.ForFirstBinding.bind(TypeDescription instrumentedType,
MethodDescription instrumentedMethod,
JavaConstant.MethodHandle methodHandle,
JavaConstant.MethodType methodType,
String name,
List<JavaConstant> constants)
Binds this replacement for a dynamic method invocation that was discovered.
|
| Modifier and Type | Method and Description |
|---|---|
MemberSubstitution.WithoutSpecification.ForMatchedDynamicInvocation |
MemberSubstitution.WithoutSpecification.ForMatchedDynamicInvocation.withType(ElementMatcher<? super JavaConstant.MethodType> typeMatcher)
Reduces matched invokedynamic instructions to such instructions that require a type which is matched by the supplied matcher.
|
| Constructor and Description |
|---|
ForDynamicInvocation(JavaConstant.MethodType methodType,
String name,
List<? extends JavaConstant> arguments)
Creates a new target for an invokedynamic instruction.
|
ForDynamicInvocation(JavaConstant.MethodType methodType,
String name,
List<JavaConstant> arguments,
MemberSubstitution.Substitution<? super MemberSubstitution.Target.ForDynamicInvocation> substitution)
Creates a resolved binding for an invokedynamic expression.
|
| Modifier and Type | Method and Description |
|---|---|
Type |
JavaConstantValue.Visitor.onMethodType(JavaConstant.MethodType constant)
Invoked on a constant that represents a
JavaConstant.MethodType. |
| Constructor and Description |
|---|
HandleInvocation(JavaConstant.MethodType methodType)
Creates a public invocation of a method handle.
|
Invokedynamic(String name,
JavaConstant.MethodType type,
JavaConstant.MethodHandle bootstrap,
List<? extends JavaConstant> arguments)
Creates a stack manipulation for a bootstrap method.
|
| Modifier and Type | Method and Description |
|---|---|
static JavaConstant.MethodType |
JavaConstant.MethodType.of(Class<?> returnType,
Class<?>... parameterType)
Returns a method type description of the given return type and parameter types.
|
static JavaConstant.MethodType |
JavaConstant.MethodType.of(Constructor<?> constructor)
Returns a method type description of the given constructor.
|
static JavaConstant.MethodType |
JavaConstant.MethodType.of(Method method)
Returns a method type description of the given method.
|
static JavaConstant.MethodType |
JavaConstant.MethodType.of(MethodDescription methodDescription)
Returns a method type description of the given method.
|
static JavaConstant.MethodType |
JavaConstant.MethodType.of(TypeDescription returnType,
List<? extends TypeDescription> parameterTypes)
Returns a method type description of the given return type and parameter types.
|
static JavaConstant.MethodType |
JavaConstant.MethodType.of(TypeDescription returnType,
TypeDescription... parameterType)
Returns a method type description of the given return type and parameter types.
|
static JavaConstant.MethodType |
JavaConstant.MethodType.ofAsm(TypePool typePool,
Type methodType)
Resolves an ASM
Type of sort Type.METHOD. |
static JavaConstant.MethodType |
JavaConstant.MethodType.ofConstant(Class<?> type)
Returns a method type for the given constant type.
|
static JavaConstant.MethodType |
JavaConstant.MethodType.ofConstant(Object instance)
Returns a method type for the given constant.
|
static JavaConstant.MethodType |
JavaConstant.MethodType.ofConstant(TypeDescription typeDescription)
Returns a method type for the given constant type.
|
static JavaConstant.MethodType |
JavaConstant.MethodType.ofGetter(Field field)
Returns a method type for a getter of the given field.
|
static JavaConstant.MethodType |
JavaConstant.MethodType.ofGetter(FieldDescription fieldDescription)
Returns a method type for a getter of the given field.
|
static JavaConstant.MethodType |
JavaConstant.MethodType.ofLoaded(Object methodType)
Returns a method type representation of a loaded
MethodType object. |
static JavaConstant.MethodType |
JavaConstant.MethodType.ofSetter(Field field)
Returns a method type for a setter of the given field.
|
static JavaConstant.MethodType |
JavaConstant.MethodType.ofSetter(FieldDescription fieldDescription)
Returns a method type for a setter of the given field.
|
static JavaConstant.MethodType |
JavaConstant.MethodType.ofSignature(Constructor<?> constructor)
Returns a method type description of the given constructor's signature without considering the constructor's
actual stack consumption and production.
|
static JavaConstant.MethodType |
JavaConstant.MethodType.ofSignature(Method method)
Returns a method type description of the given method's signature without considering the method's actual stack consumption
and production.
|
static JavaConstant.MethodType |
JavaConstant.MethodType.ofSignature(MethodDescription methodDescription)
Returns a method type description of the given method's signature without considering the method's actual stack consumption
and production.
|
| Modifier and Type | Method and Description |
|---|---|
T |
JavaConstant.Visitor.onMethodType(JavaConstant.MethodType constant)
Invoked on a constant that represents a
JavaConstant.MethodType. |
JavaConstant |
JavaConstant.Visitor.NoOp.onMethodType(JavaConstant.MethodType constant)
Invoked on a constant that represents a
JavaConstant.MethodType. |
Copyright © 2014–2025. All rights reserved.