Package | Description |
---|---|
net.bytebuddy.asm |
The ASM package contains classes that are meant for direct interaction with the ASM API.
|
net.bytebuddy.description.type |
Contains descriptions of Java types and packages.
|
net.bytebuddy.implementation |
The implementation package contains any logic for intercepting method calls.
|
net.bytebuddy.implementation.bytecode.constant |
StackManipulation s in this package are responsible for
creating compile-time constants and pushing them onto the operand stack. |
net.bytebuddy.implementation.bytecode.member |
StackManipulation s 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 |
---|---|
List<? extends JavaConstant> |
MemberSubstitution.Target.ForDynamicInvocation.getArguments()
Returns the constant arguments that are provided to the invokedynamic instruction.
|
List<JavaConstant> |
MemberSubstitution.Substitution.Chain.Step.ForDelegation.BootstrapArgumentResolver.Resolved.make(MemberSubstitution.Target target,
JavaConstant.MethodHandle methodHandle)
Returns the constant values to supply to the bootstrap method.
|
List<JavaConstant> |
MemberSubstitution.Substitution.Chain.Step.ForDelegation.BootstrapArgumentResolver.ForDefaultValues.Resolved.make(MemberSubstitution.Target target,
JavaConstant.MethodHandle methodHandle)
Returns the constant values to supply to the bootstrap method.
|
List<JavaConstant> |
Advice.BootstrapArgumentResolver.resolve(TypeDescription instrumentedType,
MethodDescription instrumentedMethod)
Resolves the constants that are provided as arguments to the bootstrap methods.
|
List<JavaConstant> |
Advice.BootstrapArgumentResolver.ForDefaultValues.resolve(TypeDescription instrumentedType,
MethodDescription instrumentedMethod)
Resolves the constants that are provided as arguments to the bootstrap methods.
|
Modifier and Type | Method and Description |
---|---|
<T extends Annotation> |
Advice.WithCustomMapping.bind(Class<T> type,
JavaConstant constant)
Binds the supplied annotation to the given Java constant.
|
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.
|
MemberSubstitution.WithoutSpecification.ForMatchedDynamicInvocation |
MemberSubstitution.WithoutSpecification.ForMatchedDynamicInvocation.withArguments(ElementMatcher<? super List<? extends JavaConstant>> argumentsMatcher)
Reduces matched invokedynamic instructions to such instructions that is provided with constant arguments which are matched by the supplied matcher.
|
Constructor and Description |
---|
Factory(ElementMatcher<? super JavaConstant.MethodHandle> handleMatcher,
ElementMatcher.Junction<? super String> nameMatcher,
ElementMatcher.Junction<? super JavaConstant.MethodType> typeMatcher,
ElementMatcher.Junction<? super List<JavaConstant>> argumentsMatcher,
MemberSubstitution.Substitution.Factory substitutionFactory)
Creates a factory for a replacement for a replacement for an invokedynamic instruction.
|
ForDynamicConstant(String name,
TypeDescription typeDescription,
JavaConstant.MethodHandle.HandleType bootstrapType,
TypeDescription bootstrapOwner,
String bootstrapName,
TypeDescription bootstrapReturnType,
List<? extends TypeDescription> bootstrapParameterTypes,
List<JavaConstant> arguments,
boolean invokedynamic)
Creates an offset mapping for a dynamic constant.
|
ForDynamicConstant(String name,
TypeDescription typeDescription,
JavaConstant.MethodHandle.HandleType bootstrapType,
TypeDescription bootstrapOwner,
String bootstrapName,
TypeDescription bootstrapReturnType,
List<? extends TypeDescription> bootstrapParameterTypes,
List<JavaConstant> arguments,
boolean invokedynamic) |
ForDynamicInvocation(ElementMatcher<? super JavaConstant.MethodHandle> handleMatcher,
ElementMatcher.Junction<? super String> nameMatcher,
ElementMatcher.Junction<? super JavaConstant.MethodType> typeMatcher,
ElementMatcher.Junction<? super List<JavaConstant>> argumentsMatcher,
MemberSubstitution.Substitution substitution)
Creates a replacement for an invokedynamic instruction.
|
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 substitution)
Creates a resolved binding for an invokedynamic expression.
|
ForMatchedDynamicInvocation(MethodGraph.Compiler methodGraphCompiler,
MemberSubstitution.TypePoolResolver typePoolResolver,
boolean strict,
boolean failIfNoMatch,
MemberSubstitution.Replacement.Factory replacementFactory,
ElementMatcher<? super JavaConstant.MethodHandle> handleMatcher,
ElementMatcher.Junction<? super String> nameMatcher,
ElementMatcher.Junction<? super JavaConstant.MethodType> typeMatcher,
ElementMatcher.Junction<? super List<? extends JavaConstant>> argumentsMatcher)
Creates a member substitution for an invokedynamic instruction.
|
OfDynamicInvocation(Class<T> annotationType,
MethodDescription.InDefinedShape bootstrapMethod,
List<? extends JavaConstant> arguments)
Creates a factory for an offset mapping that assigns the result of a dynamic method invocation.
|
OfDynamicInvocation(Class<T> annotationType,
MethodDescription.InDefinedShape bootstrapMethod,
List<? extends JavaConstant> arguments)
Creates a new factory for a dynamic invocation.
|
Modifier and Type | Method and Description |
---|---|
static TypeList |
TypeList.Explicit.of(List<? extends JavaConstant> constants)
Returns a list of types of the supplied Java constants.
|
Modifier and Type | Field and Description |
---|---|
protected List<? extends JavaConstant> |
InvokeDynamic.arguments
The arguments that are provided to the bootstrap method.
|
Modifier and Type | Method and Description |
---|---|
Implementation.Composable |
FieldAccessor.PropertyConfigurable.setsValue(JavaConstant constant)
Defines a setter of a given constant value for the described field.
|
Implementation.Composable |
FieldAccessor.ForImplicitProperty.setsValue(JavaConstant constant)
Defines a setter of a given constant value for the described field.
|
static FixedValue.AssignerConfigurable |
FixedValue.value(JavaConstant constant)
Returns the loaded version of the given
JavaConstant . |
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.
|
InvokeDynamic |
InvokeDynamic.withInstance(JavaConstant... constant)
Hands the provided Java instance to the dynamically bound method.
|
InvokeDynamic |
InvokeDynamic.AbstractDelegator.withInstance(JavaConstant... javaConstant)
Hands the provided Java instance to the dynamically bound method.
|
Constructor and Description |
---|
AbstractDelegator(MethodDescription.InDefinedShape bootstrap,
List<? extends JavaConstant> arguments,
InvokeDynamic.InvocationProvider invocationProvider,
InvokeDynamic.TerminationHandler terminationHandler,
Assigner assigner,
Assigner.Typing typing)
Creates a new abstract delegator for a dynamic method invocation.
|
InvokeDynamic(MethodDescription.InDefinedShape bootstrap,
List<? extends JavaConstant> arguments,
InvokeDynamic.InvocationProvider invocationProvider,
InvokeDynamic.TerminationHandler terminationHandler,
Assigner assigner,
Assigner.Typing typing)
Creates a new invoke dynamic implementation.
|
OfArgument(MethodDescription.InDefinedShape bootstrap,
List<? extends JavaConstant> arguments,
InvokeDynamic.InvocationProvider invocationProvider,
InvokeDynamic.TerminationHandler terminationHandler,
Assigner assigner,
Assigner.Typing typing,
int index)
Creates a new invoke dynamic instance with an implicit field type for the provided value.
|
OfField(MethodDescription.InDefinedShape bootstrap,
List<? extends JavaConstant> arguments,
InvokeDynamic.InvocationProvider invocationProvider,
InvokeDynamic.TerminationHandler terminationHandler,
Assigner assigner,
Assigner.Typing typing,
String fieldName,
FieldLocator.Factory fieldLocatorFactory)
Creates a new abstract delegator for a dynamic method invocation where the last argument is assigned an implicit type.
|
OfInstance(MethodDescription.InDefinedShape bootstrap,
List<? extends JavaConstant> arguments,
InvokeDynamic.InvocationProvider invocationProvider,
InvokeDynamic.TerminationHandler terminationHandler,
Assigner assigner,
Assigner.Typing typing,
Object value)
Creates a new invoke dynamic instance with an implicit field type for the provided value.
|
WithImplicitArguments(MethodDescription.InDefinedShape bootstrap,
List<? extends JavaConstant> arguments,
InvokeDynamic.InvocationProvider invocationProvider,
InvokeDynamic.TerminationHandler terminationHandler,
Assigner assigner,
Assigner.Typing typing)
Creates a new dynamic method invocation with implicit arguments.
|
WithImplicitTarget(MethodDescription.InDefinedShape bootstrap,
List<? extends JavaConstant> arguments,
InvokeDynamic.InvocationProvider invocationProvider,
InvokeDynamic.TerminationHandler terminationHandler,
Assigner assigner,
Assigner.Typing typing)
Creates a new dynamic method invocation with implicit arguments and an implicit invocation target.
|
WithImplicitType(MethodDescription.InDefinedShape bootstrap,
List<? extends JavaConstant> arguments,
InvokeDynamic.InvocationProvider invocationProvider,
InvokeDynamic.TerminationHandler terminationHandler,
Assigner assigner,
Assigner.Typing typing)
Creates a new abstract delegator for a dynamic method invocation where the last argument is assigned an implicit type.
|
Constructor and Description |
---|
JavaConstantValue(JavaConstant constant)
Creates a constant pool value representing a
JavaConstant . |
Modifier and Type | Method and Description |
---|---|
StackManipulation |
MethodInvocation.IllegalInvocation.dynamic(String methodName,
TypeDescription returnType,
List<? extends TypeDescription> methodType,
List<? extends JavaConstant> arguments)
Invokes the method as a bootstrap method to bind a call site with the given properties.
|
StackManipulation |
MethodInvocation.WithImplicitInvocationTargetType.dynamic(String methodName,
TypeDescription returnType,
List<? extends TypeDescription> methodType,
List<? extends JavaConstant> arguments)
Invokes the method as a bootstrap method to bind a call site with the given properties.
|
StackManipulation |
MethodInvocation.OfGenericMethod.dynamic(String methodName,
TypeDescription returnType,
List<? extends TypeDescription> methodType,
List<? extends JavaConstant> arguments)
Invokes the method as a bootstrap method to bind a call site with the given properties.
|
StackManipulation |
MethodInvocation.Invocation.dynamic(String name,
TypeDescription returnType,
List<? extends TypeDescription> methodType,
List<? extends JavaConstant> arguments)
Invokes the method as a bootstrap method to bind a call site with the given properties.
|
Constructor and Description |
---|
Invokedynamic(String name,
JavaConstant.MethodType type,
JavaConstant.MethodHandle bootstrap,
List<? extends JavaConstant> arguments)
Creates a stack manipulation for a bootstrap method.
|
Modifier and Type | Class and Description |
---|---|
static class |
JavaConstant.Dynamic
Represents a dynamically resolved constant pool entry of a class file.
|
static class |
JavaConstant.MethodHandle
Represents a
java.lang.invoke.MethodHandle object. |
static class |
JavaConstant.MethodType
Represents a
java.lang.invoke.MethodType object. |
static class |
JavaConstant.Simple<T>
|
protected static class |
JavaConstant.Simple.OfTrivialValue<S>
Represents a trivial constant value that represents itself.
|
protected static class |
JavaConstant.Simple.OfTrivialValue.ForDouble |
protected static class |
JavaConstant.Simple.OfTrivialValue.ForFloat |
protected static class |
JavaConstant.Simple.OfTrivialValue.ForInteger |
protected static class |
JavaConstant.Simple.OfTrivialValue.ForLong |
protected static class |
JavaConstant.Simple.OfTrivialValue.ForString |
protected static class |
JavaConstant.Simple.OfTypeDescription
Represents a type constant.
|
Modifier and Type | Method and Description |
---|---|
static JavaConstant |
JavaConstant.Simple.of(TypeDescription typeDescription)
Returns a Java constant representation for a
TypeDescription . |
static JavaConstant |
JavaConstant.Dynamic.ofArrayVarHandle(Class<?> type)
Resolves a var handle constant for an array.
|
static JavaConstant |
JavaConstant.Dynamic.ofArrayVarHandle(TypeDescription typeDescription)
Resolves a var handle constant for an array.
|
static JavaConstant |
JavaConstant.Simple.ofAsm(TypePool typePool,
Object value)
Resolves an ASM constant to a
JavaConstant . |
static JavaConstant |
JavaConstant.Simple.ofDescription(Object value,
ClassFileLocator classFileLocator)
Creates a Java constant value from a
java.lang.constant.ConstantDesc . |
static JavaConstant |
JavaConstant.Simple.ofDescription(Object value,
ClassLoader classLoader)
Creates a Java constant value from a
java.lang.constant.ConstantDesc . |
static JavaConstant |
JavaConstant.Simple.ofDescription(Object value,
TypePool typePool)
Creates a Java constant value from a
java.lang.constant.ConstantDesc . |
static JavaConstant |
JavaConstant.Dynamic.ofEnumeration(Enum<?> enumeration)
Returns a
Enum value constant. |
static JavaConstant |
JavaConstant.Dynamic.ofEnumeration(EnumerationDescription enumerationDescription)
Returns a
Enum value constant. |
static JavaConstant |
JavaConstant.Simple.ofLoaded(Object value)
Resolves a loaded Java value to a Java constant representation.
|
protected static JavaConstant |
JavaConstant.Simple.ofLoadedOrNull(Object value)
Resolves a loaded Java value to a Java constant representation.
|
static JavaConstant |
JavaConstant.Dynamic.ofPrimitiveType(Class<?> type)
Returns a
Class constant for a primitive type. |
static JavaConstant |
JavaConstant.Dynamic.ofPrimitiveType(TypeDescription typeDescription)
Returns a
Class constant for a primitive type. |
static JavaConstant |
JavaConstant.Dynamic.ofVarHandle(Field field)
Resolves a var handle constant for a field.
|
static JavaConstant |
JavaConstant.Dynamic.ofVarHandle(FieldDescription.InDefinedShape fieldDescription)
Resolves a var handle constant for a field.
|
JavaConstant |
JavaConstant.Visitor.NoOp.onDynamic(JavaConstant.Dynamic constant)
Invoked on a
JavaConstant.Dynamic constant. |
JavaConstant |
JavaConstant.Visitor.NoOp.onMethodHandle(JavaConstant.MethodHandle constant)
Invoked on a constant that represents a
JavaConstant.MethodHandle . |
JavaConstant |
JavaConstant.Visitor.NoOp.onMethodType(JavaConstant.MethodType constant)
Invoked on a constant that represents a
JavaConstant.MethodType . |
JavaConstant |
JavaConstant.Visitor.NoOp.onType(JavaConstant.Simple<TypeDescription> constant)
Invoked on a
JavaConstant.Simple constant that represents a TypeDescription . |
JavaConstant |
JavaConstant.Visitor.NoOp.onValue(JavaConstant.Simple<?> constant)
Invoked on a
JavaConstant.Simple constant that represents itself. |
JavaConstant |
JavaConstant.Dynamic.withType(Class<?> type)
Resolves this
JavaConstant.Dynamic constant to resolve the returned instance to the supplied type. |
JavaConstant |
JavaConstant.Dynamic.withType(TypeDescription typeDescription)
Resolves this
JavaConstant.Dynamic constant to resolve the returned instance to the supplied type. |
static JavaConstant |
JavaConstant.Simple.wrap(Object value)
Wraps a value representing a loaded or unloaded constant as
JavaConstant instance. |
Modifier and Type | Method and Description |
---|---|
List<JavaConstant> |
JavaConstant.Dynamic.getArguments()
Returns a list of the arguments to the dynamic constant.
|
static List<JavaConstant> |
JavaConstant.Simple.wrap(List<?> values)
Wraps a list of either loaded or unloaded constant representations as
JavaConstant instances. |
Constructor and Description |
---|
Dynamic(String name,
TypeDescription typeDescription,
JavaConstant.MethodHandle bootstrap,
List<JavaConstant> arguments)
Creates a dynamic resolved constant.
|
Copyright © 2014–2025. All rights reserved.