Package | Description |
---|---|
net.bytebuddy.asm |
The ASM package contains classes that are meant for direct interaction with the ASM API.
|
net.bytebuddy.description.field |
Contains descriptions of Java fields.
|
net.bytebuddy.description.method |
Contains descriptions of Java methods and constructors as well as their parameters.
|
net.bytebuddy.dynamic |
This package contains classes and interfaces that are connected to writing the byte stream that represents a Java
type that is dynamically created and for loading this type into a running JVM process.
|
net.bytebuddy.dynamic.scaffold |
This package contains helper types and implementations that are responsible for the actual writing of a byte array
representing a Java class.
|
net.bytebuddy.dynamic.scaffold.inline |
All classes and types in this package are related to creating a
DynamicType by
enhancing a given type. |
net.bytebuddy.implementation |
The implementation package contains any logic for intercepting method calls.
|
Modifier and Type | Method and Description |
---|---|
protected abstract ByteCodeElement.Member |
MemberSubstitution.Source.element(ByteCodeElement.Member original,
MethodDescription instrumentedMethod)
Resolves the targeted byte code element.
|
Modifier and Type | Method and Description |
---|---|
StackManipulation |
MemberSubstitution.Substitution.Chain.Step.ForDelegation.Dispatcher.Resolved.apply(TypeDescription receiver,
ByteCodeElement.Member original,
JavaConstant.MethodHandle methodHandle)
Creates a stack manipulation for a given substitution target.
|
StackManipulation |
MemberSubstitution.Substitution.Chain.Step.ForDelegation.Dispatcher.ForRegularInvocation.apply(TypeDescription receiver,
ByteCodeElement.Member original,
JavaConstant.MethodHandle methodHandle)
Creates a stack manipulation for a given substitution target.
|
StackManipulation |
MemberSubstitution.Substitution.Chain.Step.ForDelegation.Dispatcher.ForDynamicInvocation.Resolved.apply(TypeDescription receiver,
ByteCodeElement.Member original,
JavaConstant.MethodHandle methodHandle)
Creates a stack manipulation for a given substitution target.
|
StackManipulation |
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Resolved.apply(TypeDescription receiver,
ByteCodeElement.Member original,
TypeList.Generic parameters,
TypeDescription.Generic result,
TypeDescription.Generic current,
JavaConstant.MethodHandle methodHandle,
Map<Integer,Integer> offsets,
int offset)
Applies this offset mapping.
|
StackManipulation |
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Resolved.ForStackManipulation.apply(TypeDescription receiver,
ByteCodeElement.Member original,
TypeList.Generic parameters,
TypeDescription.Generic result,
TypeDescription.Generic current,
JavaConstant.MethodHandle methodHandle,
Map<Integer,Integer> offsets,
int offset)
Applies this offset mapping.
|
StackManipulation |
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForStackManipulation.Resolved.apply(TypeDescription receiver,
ByteCodeElement.Member original,
TypeList.Generic parameters,
TypeDescription.Generic result,
TypeDescription.Generic current,
JavaConstant.MethodHandle methodHandle,
Map<Integer,Integer> offsets,
int offset)
Applies this offset mapping.
|
StackManipulation |
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForArgument.Resolved.apply(TypeDescription receiver,
ByteCodeElement.Member original,
TypeList.Generic parameters,
TypeDescription.Generic result,
TypeDescription.Generic current,
JavaConstant.MethodHandle methodHandle,
Map<Integer,Integer> offsets,
int offset)
Applies this offset mapping.
|
StackManipulation |
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForThisReference.Resolved.apply(TypeDescription receiver,
ByteCodeElement.Member original,
TypeList.Generic parameters,
TypeDescription.Generic result,
TypeDescription.Generic current,
JavaConstant.MethodHandle methodHandle,
Map<Integer,Integer> offsets,
int offset)
Applies this offset mapping.
|
StackManipulation |
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForAllArguments.Resolved.apply(TypeDescription receiver,
ByteCodeElement.Member original,
TypeList.Generic parameters,
TypeDescription.Generic result,
TypeDescription.Generic current,
JavaConstant.MethodHandle methodHandle,
Map<Integer,Integer> offsets,
int offset)
Applies this offset mapping.
|
StackManipulation |
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForSelfCallHandle.Bound.apply(TypeDescription receiver,
ByteCodeElement.Member original,
TypeList.Generic parameters,
TypeDescription.Generic result,
TypeDescription.Generic current,
JavaConstant.MethodHandle methodHandle,
Map<Integer,Integer> offsets,
int offset)
Applies this offset mapping.
|
StackManipulation |
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForSelfCallHandle.Unbound.apply(TypeDescription receiver,
ByteCodeElement.Member original,
TypeList.Generic parameters,
TypeDescription.Generic result,
TypeDescription.Generic current,
JavaConstant.MethodHandle methodHandle,
Map<Integer,Integer> offsets,
int offset)
Applies this offset mapping.
|
StackManipulation |
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForOrigin.Resolved.apply(TypeDescription receiver,
ByteCodeElement.Member original,
TypeList.Generic parameters,
TypeDescription.Generic result,
TypeDescription.Generic current,
JavaConstant.MethodHandle methodHandle,
Map<Integer,Integer> offsets,
int offset)
Applies this offset mapping.
|
StackManipulation |
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForStubValue.Resolved.apply(TypeDescription receiver,
ByteCodeElement.Member original,
TypeList.Generic parameters,
TypeDescription.Generic result,
TypeDescription.Generic current,
JavaConstant.MethodHandle methodHandle,
Map<Integer,Integer> offsets,
int offset)
Applies this offset mapping.
|
StackManipulation |
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForCurrent.Resolved.apply(TypeDescription receiver,
ByteCodeElement.Member original,
TypeList.Generic parameters,
TypeDescription.Generic result,
TypeDescription.Generic current,
JavaConstant.MethodHandle methodHandle,
Map<Integer,Integer> offsets,
int offset)
Applies this offset mapping.
|
protected abstract MemberSubstitution.Source.Value |
MemberSubstitution.Source.argument(int index,
TypeList.Generic parameters,
Map<Integer,Integer> offsets,
ByteCodeElement.Member original,
MethodDescription instrumentedMethod)
Resolves a value representation of the parameter of the specified index or
null if no such parameter is available. |
protected abstract List<MemberSubstitution.Source.Value> |
MemberSubstitution.Source.arguments(boolean includesSelf,
TypeList.Generic parameters,
Map<Integer,Integer> offsets,
ByteCodeElement.Member original,
MethodDescription instrumentedMethod)
Resolves a list of value representation of all parameters.
|
protected abstract MemberSubstitution.Substitution.Chain.Step.Resolution |
MemberSubstitution.Substitution.Chain.Step.ForField.doResolve(ByteCodeElement.Member original,
TypeList.Generic parameters,
Map<Integer,Integer> offsets,
StackManipulation stackManipulation)
Completes the resolution.
|
protected MemberSubstitution.Substitution.Chain.Step.Resolution |
MemberSubstitution.Substitution.Chain.Step.ForField.Read.doResolve(ByteCodeElement.Member original,
TypeList.Generic parameters,
Map<Integer,Integer> offsets,
StackManipulation stackManipulation)
Completes the resolution.
|
protected MemberSubstitution.Substitution.Chain.Step.Resolution |
MemberSubstitution.Substitution.Chain.Step.ForField.Write.doResolve(ByteCodeElement.Member original,
TypeList.Generic parameters,
Map<Integer,Integer> offsets,
StackManipulation stackManipulation)
Completes the resolution.
|
protected abstract ByteCodeElement.Member |
MemberSubstitution.Source.element(ByteCodeElement.Member original,
MethodDescription instrumentedMethod)
Resolves the targeted byte code element.
|
protected abstract boolean |
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForOrigin.Sort.isRepresentable(ByteCodeElement.Member original)
Checks if the supplied member can be represented by this sort.
|
protected abstract boolean |
MemberSubstitution.Source.isRepresentable(MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForOrigin.Sort sort,
ByteCodeElement.Member original,
MethodDescription instrumentedMethod)
Validates if the supplied origin sort is representable.
|
List<JavaConstant> |
MemberSubstitution.Substitution.Chain.Step.ForDelegation.BootstrapArgumentResolver.Resolved.make(TypeDescription receiver,
ByteCodeElement.Member original,
JavaConstant.MethodHandle methodHandle)
Returns the constant values to supply to the bootstrap method.
|
List<JavaConstant> |
MemberSubstitution.Substitution.Chain.Step.ForDelegation.BootstrapArgumentResolver.ForDefaultValues.Resolved.make(TypeDescription receiver,
ByteCodeElement.Member original,
JavaConstant.MethodHandle methodHandle)
Returns the constant values to supply to the bootstrap method.
|
protected abstract StackManipulation |
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForOrigin.Sort.resolve(ByteCodeElement.Member original,
List<TypeDescription> parameterTypes,
TypeDescription returnType)
Creates a stack manipulation for the supplied byte code element.
|
protected abstract StackManipulation |
MemberSubstitution.Source.resolve(MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForOrigin.Sort sort,
ByteCodeElement.Member original,
TypeList.Generic parameters,
TypeDescription.Generic result,
MethodDescription instrumentedMethod)
Resolves a stack manipulation that loads the supplied sort of origin onto the operand stack.
|
FieldDescription |
MemberSubstitution.Substitution.ForFieldAccess.FieldResolver.resolve(TypeDescription receiver,
ByteCodeElement.Member original,
TypeList.Generic parameters,
TypeDescription.Generic result)
Resolves the field to substitute with.
|
FieldDescription |
MemberSubstitution.Substitution.ForFieldAccess.FieldResolver.Simple.resolve(TypeDescription receiver,
ByteCodeElement.Member original,
TypeList.Generic parameters,
TypeDescription.Generic result)
Resolves the field to substitute with.
|
FieldDescription |
MemberSubstitution.Substitution.ForFieldAccess.FieldResolver.ForElementMatcher.resolve(TypeDescription receiver,
ByteCodeElement.Member original,
TypeList.Generic parameters,
TypeDescription.Generic result)
Resolves the field to substitute with.
|
MethodDescription |
MemberSubstitution.Substitution.ForMethodInvocation.MethodResolver.resolve(TypeDescription receiver,
ByteCodeElement.Member original,
TypeList.Generic parameters,
TypeDescription.Generic result)
Resolves the method to substitute with.
|
MethodDescription |
MemberSubstitution.Substitution.ForMethodInvocation.MethodResolver.Simple.resolve(TypeDescription receiver,
ByteCodeElement.Member original,
TypeList.Generic parameters,
TypeDescription.Generic result)
Resolves the method to substitute with.
|
MethodDescription |
MemberSubstitution.Substitution.ForMethodInvocation.MethodResolver.Matching.resolve(TypeDescription receiver,
ByteCodeElement.Member original,
TypeList.Generic parameters,
TypeDescription.Generic result)
Resolves the method to substitute with.
|
StackManipulation |
MemberSubstitution.Substitution.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 |
MemberSubstitution.Substitution.Stubbing.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 |
MemberSubstitution.Substitution.ForValue.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 |
MemberSubstitution.Substitution.ForFieldAccess.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 |
MemberSubstitution.Substitution.ForMethodInvocation.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 |
MemberSubstitution.Substitution.Chain.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.
|
MemberSubstitution.Substitution.Chain.Step.Resolution |
MemberSubstitution.Substitution.Chain.Step.resolve(TypeDescription receiver,
ByteCodeElement.Member original,
TypeList.Generic parameters,
TypeDescription.Generic result,
JavaConstant.MethodHandle methodHandle,
StackManipulation stackManipulation,
TypeDescription.Generic current,
Map<Integer,Integer> offsets,
int freeOffset)
Resolves this step of a substitution chain.
|
MemberSubstitution.Substitution.Chain.Step.Resolution |
MemberSubstitution.Substitution.Chain.Step.OfOriginalExpression.resolve(TypeDescription receiver,
ByteCodeElement.Member original,
TypeList.Generic parameters,
TypeDescription.Generic result,
JavaConstant.MethodHandle methodHandle,
StackManipulation stackManipulation,
TypeDescription.Generic current,
Map<Integer,Integer> offsets,
int freeOffset)
Resolves this step of a substitution chain.
|
MemberSubstitution.Substitution.Chain.Step.Resolution |
MemberSubstitution.Substitution.Chain.Step.Simple.resolve(TypeDescription receiver,
ByteCodeElement.Member original,
TypeList.Generic parameters,
TypeDescription.Generic result,
JavaConstant.MethodHandle methodHandle,
StackManipulation stackManipulation,
TypeDescription.Generic current,
Map<Integer,Integer> offsets,
int freeOffset)
Resolves this step of a substitution chain.
|
MemberSubstitution.Substitution.Chain.Step.Resolution |
MemberSubstitution.Substitution.Chain.Step.ForAssignment.resolve(TypeDescription receiver,
ByteCodeElement.Member original,
TypeList.Generic parameters,
TypeDescription.Generic result,
JavaConstant.MethodHandle methodHandle,
StackManipulation stackManipulation,
TypeDescription.Generic current,
Map<Integer,Integer> offsets,
int freeOffset)
Resolves this step of a substitution chain.
|
MemberSubstitution.Substitution.Chain.Step.Resolution |
MemberSubstitution.Substitution.Chain.Step.ForArgumentSubstitution.resolve(TypeDescription receiver,
ByteCodeElement.Member original,
TypeList.Generic parameters,
TypeDescription.Generic result,
JavaConstant.MethodHandle methodHandle,
StackManipulation stackManipulation,
TypeDescription.Generic current,
Map<Integer,Integer> offsets,
int freeOffset)
Resolves this step of a substitution chain.
|
MemberSubstitution.Substitution.Chain.Step.Resolution |
MemberSubstitution.Substitution.Chain.Step.ForArgumentLoading.resolve(TypeDescription receiver,
ByteCodeElement.Member original,
TypeList.Generic parameters,
TypeDescription.Generic result,
JavaConstant.MethodHandle methodHandle,
StackManipulation stackManipulation,
TypeDescription.Generic current,
Map<Integer,Integer> offsets,
int freeOffset)
Resolves this step of a substitution chain.
|
MemberSubstitution.Substitution.Chain.Step.Resolution |
MemberSubstitution.Substitution.Chain.Step.ForField.resolve(TypeDescription receiver,
ByteCodeElement.Member original,
TypeList.Generic parameters,
TypeDescription.Generic result,
JavaConstant.MethodHandle methodHandle,
StackManipulation stackManipulation,
TypeDescription.Generic current,
Map<Integer,Integer> offsets,
int freeOffset)
Resolves this step of a substitution chain.
|
MemberSubstitution.Substitution.Chain.Step.Resolution |
MemberSubstitution.Substitution.Chain.Step.ForInvocation.resolve(TypeDescription receiver,
ByteCodeElement.Member original,
TypeList.Generic parameters,
TypeDescription.Generic result,
JavaConstant.MethodHandle methodHandle,
StackManipulation stackManipulation,
TypeDescription.Generic current,
Map<Integer,Integer> offsets,
int freeOffset)
Resolves this step of a substitution chain.
|
MemberSubstitution.Substitution.Chain.Step.Resolution |
MemberSubstitution.Substitution.Chain.Step.ForDelegation.resolve(TypeDescription receiver,
ByteCodeElement.Member original,
TypeList.Generic parameters,
TypeDescription.Generic result,
JavaConstant.MethodHandle methodHandle,
StackManipulation stackManipulation,
TypeDescription.Generic current,
Map<Integer,Integer> offsets,
int freeOffset)
Resolves this step of a substitution chain.
|
protected abstract MemberSubstitution.Source.Value |
MemberSubstitution.Source.self(TypeList.Generic parameters,
Map<Integer,Integer> offsets,
ByteCodeElement.Member original,
MethodDescription instrumentedMethod)
Resolves a value representation of the
this reference or null if no such reference is available. |
Modifier and Type | Method and Description |
---|---|
MemberSubstitution.WithoutSpecification |
MemberSubstitution.element(ElementMatcher<? super ByteCodeElement.Member> matcher)
Substitutes any interaction with a field or method that matches the given matcher.
|
protected static MemberSubstitution.Replacement.Factory |
MemberSubstitution.Replacement.ForElementMatchers.Factory.of(ElementMatcher<? super ByteCodeElement.Member> matcher,
MemberSubstitution.Substitution.Factory factory)
Creates a factory for applying a substitution on all matched byte code elements for all access types.
|
Constructor and Description |
---|
Resolved(TypeDescription receiver,
ByteCodeElement.Member original,
MemberSubstitution.Substitution substitution)
Creates a new resolved binding.
|
Constructor and Description |
---|
ForMatchedByteCodeElement(MethodGraph.Compiler methodGraphCompiler,
MemberSubstitution.TypePoolResolver typePoolResolver,
boolean strict,
boolean failIfNoMatch,
MemberSubstitution.Replacement.Factory replacementFactory,
ElementMatcher<? super ByteCodeElement.Member> matcher)
Creates a new member substitution for a matched byte code element that requires a specification for how to perform a substitution.
|
Modifier and Type | Interface and Description |
---|---|
interface |
FieldDescription
Implementations of this interface describe a Java field.
|
static interface |
FieldDescription.InDefinedShape
Represents a field in its defined shape, i.e.
|
static interface |
FieldDescription.InGenericShape
Represents a field description in its generic shape, i.e.
|
Modifier and Type | Class and Description |
---|---|
static class |
FieldDescription.AbstractBase
An abstract base implementation of a field description.
|
static class |
FieldDescription.ForLoadedField
An implementation of a field description for a loaded field.
|
static class |
FieldDescription.InDefinedShape.AbstractBase
An abstract base implementation of a field description in its defined shape.
|
static class |
FieldDescription.Latent
A latent field description describes a field that is not attached to a declaring
TypeDescription . |
static class |
FieldDescription.TypeSubstituting
A field description that represents a given field but with a substituted field type.
|
Modifier and Type | Interface and Description |
---|---|
interface |
MethodDescription
Implementations of this interface describe a Java method, i.e.
|
static interface |
MethodDescription.InDefinedShape
Represents a method in its defined shape, i.e.
|
static interface |
MethodDescription.InGenericShape
Represents a method description in its generic shape, i.e.
|
Modifier and Type | Class and Description |
---|---|
static class |
MethodDescription.AbstractBase
An abstract base implementation of a method description.
|
static class |
MethodDescription.ForLoadedConstructor
An implementation of a method description for a loaded constructor.
|
static class |
MethodDescription.ForLoadedMethod
An implementation of a method description for a loaded method.
|
static class |
MethodDescription.InDefinedShape.AbstractBase
An abstract base implementation of a method description in its defined shape.
|
protected static class |
MethodDescription.InDefinedShape.AbstractBase.ForLoadedExecutable<T extends AnnotatedElement>
A base implementation for a loaded instance representation for a
java.lang.reflect.Executable . |
static class |
MethodDescription.Latent
A latent method description describes a method that is not attached to a declaring
TypeDescription . |
static class |
MethodDescription.Latent.TypeInitializer
A method description that represents the type initializer.
|
static class |
MethodDescription.TypeSubstituting
A method description that represents a given method but with substituted method types.
|
Modifier and Type | Class and Description |
---|---|
protected static class |
Transformer.ForField.TransformedField
An implementation of a transformed field.
|
protected static class |
Transformer.ForMethod.TransformedMethod
The transformed method.
|
Modifier and Type | Class and Description |
---|---|
protected static class |
TypeWriter.MethodPool.Record.AccessBridgeWrapper.AccessorBridge
A method representing an accessor bridge method.
|
protected static class |
TypeWriter.MethodPool.Record.AccessBridgeWrapper.BridgeTarget
A method representing a bridge's target method in its defined shape.
|
protected static class |
TypeWriter.MethodPool.Record.ForDefinedMethod.OfVisibilityBridge.VisibilityBridge
A method describing a visibility bridge.
|
Modifier and Type | Class and Description |
---|---|
protected static class |
MethodRebaseResolver.Resolution.ForRebasedConstructor.RebasedConstructor
An description of a rebased constructor.
|
protected static class |
MethodRebaseResolver.Resolution.ForRebasedMethod.RebasedMethod
A description of a rebased method.
|
Modifier and Type | Class and Description |
---|---|
protected static class |
Implementation.Context.Default.AbstractPropertyAccessorMethod
A base implementation of a method that accesses a property of an instrumented type.
|
protected static class |
Implementation.Context.Default.AccessorMethod
A description of an accessor method to access another method from outside the instrumented type.
|
protected static class |
Implementation.Context.Default.CacheValueField
A description of a field that stores a cached value.
|
protected static class |
Implementation.Context.Default.FieldGetter
A description of a field getter method.
|
protected static class |
Implementation.Context.Default.FieldSetter
A description of a field setter method.
|
Copyright © 2014–2024. All rights reserved.