Package | Description |
---|---|
net.bytebuddy.instrumentation |
The instrumentation package contains any logic for intercepting method calls.
|
net.bytebuddy.instrumentation.method.bytecode.bind |
The types and classes of this package are responsible for binding a method call to calling another method.
|
net.bytebuddy.instrumentation.method.bytecode.bind.annotation |
This package contains annotations, types and classes that are responsible for binding a method to calling another
method by interpreting annotations that indicate how a method should be bound to another method.
|
net.bytebuddy.instrumentation.method.bytecode.stack |
This package offers an abstraction of creating Java byte code by only manipulating a method's operand stack.
|
net.bytebuddy.instrumentation.method.bytecode.stack.assign |
An
Assigner is responsible for transforming
a given TypeDescription into another one. |
net.bytebuddy.instrumentation.method.bytecode.stack.assign.primitive |
Assigner implementations of this package
are capable of handling primitive types or the void type. |
net.bytebuddy.instrumentation.method.bytecode.stack.assign.reference |
Assigner implementations of this package
are capable of assigning non-primitive types to each other. |
net.bytebuddy.instrumentation.method.bytecode.stack.collection |
This package is dedicated to creating
StackManipulation s
that create collections or arrays from a given number of values. |
net.bytebuddy.instrumentation.method.bytecode.stack.constant |
StackManipulation s in this package are responsible for
creating compile-time constants and pushing them onto the operand stack. |
net.bytebuddy.instrumentation.method.bytecode.stack.member |
StackManipulation s of this package are responsible for
accessing type or method members, i.e. |
net.bytebuddy.instrumentation.type.auxiliary |
Auxiliary types describe helper types that aid as a supplementary to a given
InstrumentedType . |
Modifier and Type | Method and Description |
---|---|
StackManipulation |
MethodDelegation.InstrumentationDelegate.getPreparingStackAssignment(TypeDescription instrumentedType)
Returns the stack manipulation responsible for preparing the instance representing the instrumentation.
|
StackManipulation |
MethodDelegation.InstrumentationDelegate.ForStaticMethod.getPreparingStackAssignment(TypeDescription instrumentedType) |
StackManipulation |
MethodDelegation.InstrumentationDelegate.ForStaticFieldInstance.getPreparingStackAssignment(TypeDescription instrumentedType) |
StackManipulation |
MethodDelegation.InstrumentationDelegate.ForInstanceField.getPreparingStackAssignment(TypeDescription instrumentedType) |
StackManipulation |
MethodDelegation.InstrumentationDelegate.ForConstruction.getPreparingStackAssignment(TypeDescription instrumentedType) |
StackManipulation |
ExceptionMethod.ConstructionDelegate.make()
Creates a stack manipulation that creates pushes all constructor arguments onto the operand stack
and subsequently calls the constructor.
|
StackManipulation |
ExceptionMethod.ConstructionDelegate.ForDefaultConstructor.make() |
StackManipulation |
ExceptionMethod.ConstructionDelegate.ForStringConstructor.make() |
Modifier and Type | Method and Description |
---|---|
protected ByteCodeAppender.Size |
InvocationHandlerAdapter.apply(org.objectweb.asm.MethodVisitor methodVisitor,
Instrumentation.Context instrumentationContext,
MethodDescription instrumentedMethod,
TypeDescription instrumentedType,
StackManipulation preparingManipulation)
Applies an instrumentation that delegates to a invocation handler.
|
protected ByteCodeAppender.Size |
FixedValue.apply(org.objectweb.asm.MethodVisitor methodVisitor,
Instrumentation.Context instrumentationContext,
MethodDescription instrumentedMethod,
TypeDescription fixedValueType,
StackManipulation valueLoadingInstruction)
Blueprint method that for applying the actual instrumentation.
|
Constructor and Description |
---|
ForPoolValue(StackManipulation valueLoadInstruction,
Class<?> loadedType,
Assigner assigner,
boolean considerRuntimeType)
Creates a new constant pool fixed value instrumentation.
|
Modifier and Type | Interface and Description |
---|---|
static interface |
MethodDelegationBinder.MethodBinding
A binding attempt created by a
MethodDelegationBinder . |
static interface |
MethodDelegationBinder.ParameterBinding<T>
A binding attempt for a single parameter.
|
Modifier and Type | Class and Description |
---|---|
static class |
MethodDelegationBinder.MethodBinding.Illegal
Representation of an attempt to bind a source method to a target method that is not applicable.
|
static class |
MethodDelegationBinder.ParameterBinding.Anonymous
An anonymous binding of a target method parameter.
|
static class |
MethodDelegationBinder.ParameterBinding.Illegal
A singleton representation of an illegal binding for a method parameter.
|
static class |
MethodDelegationBinder.ParameterBinding.Unique<T>
A uniquely identifiable parameter binding for a target method.
|
Modifier and Type | Method and Description |
---|---|
StackManipulation |
MethodDelegationBinder.MethodInvoker.invoke(MethodDescription methodDescription)
Creates a method invocation for a given method.
|
StackManipulation |
MethodDelegationBinder.MethodInvoker.Simple.invoke(MethodDescription methodDescription) |
StackManipulation |
MethodDelegationBinder.MethodInvoker.Virtual.invoke(MethodDescription methodDescription) |
Modifier and Type | Method and Description |
---|---|
MethodDelegationBinder.MethodBinding |
MethodDelegationBinder.MethodBinding.Builder.build(StackManipulation returnValueStackManipulation)
Creates a binding that represents the bindings collected by this
Builder. |
static <S> MethodDelegationBinder.ParameterBinding.Unique<S> |
MethodDelegationBinder.ParameterBinding.Unique.of(StackManipulation delegate,
S identificationToken)
A factory method for creating a unique binding that infers the tokens type.
|
Constructor and Description |
---|
Anonymous(StackManipulation delegate)
Creates a new, anonymous parameter binding.
|
Unique(StackManipulation delegate,
T identificationToken)
Creates a new unique parameter binding representant.
|
Modifier and Type | Method and Description |
---|---|
protected abstract StackManipulation |
Super.Instantiation.proxyFor(TypeDescription parameterType,
TypeDescription instrumentedType,
Super annotation)
Creates a stack manipulation which loads a
super -call proxy onto the stack. |
Modifier and Type | Class and Description |
---|---|
class |
Duplication
Duplicates a value that is lying on top of the stack.
|
class |
IllegalStackManipulation
An impossible manipulation of the operand stack that must not be applied.
|
class |
LegalTrivialStackManipulation
A trivial stack manipulation that does not require any manipulation of the operand stack.
|
static class |
StackManipulation.Compound
An immutable stack manipulation that aggregates a sequence of other stack manipulations.
|
class |
Throw
Throws a
Throwable which must lie on top of the stack when this stack manipulation is called. |
class |
TypeCreation
A stack manipulation for creating an undefined type on which a constructor is to be called.
|
Modifier and Type | Method and Description |
---|---|
static StackManipulation |
Duplication.duplicate(TypeDescription typeDescription)
Duplicates a value given its type.
|
static StackManipulation |
TypeCreation.forType(TypeDescription typeDescription)
Creates a type creation for the given type.
|
Constructor and Description |
---|
Compound(StackManipulation... stackManipulation)
Creates a new compound stack manipulation.
|
Modifier and Type | Method and Description |
---|---|
StackManipulation |
Assigner.assign(TypeDescription sourceType,
TypeDescription targetType,
boolean considerRuntimeType) |
Modifier and Type | Class and Description |
---|---|
class |
PrimitiveUnboxingDelegate
This delegate is responsible for unboxing a wrapper type to their primitive equivalents.
|
Modifier and Type | Method and Description |
---|---|
StackManipulation |
VoidAwareAssigner.assign(TypeDescription sourceType,
TypeDescription targetType,
boolean considerRuntimeType) |
StackManipulation |
PrimitiveTypeAwareAssigner.assign(TypeDescription sourceType,
TypeDescription targetType,
boolean considerRuntimeType) |
StackManipulation |
PrimitiveBoxingDelegate.assignBoxedTo(TypeDescription targetType,
Assigner chainedAssigner,
boolean considerRuntimeType)
Creates a stack manipulation that boxes the represented primitive type and applies a chained assignment
to the result of this boxing operation.
|
StackManipulation |
PrimitiveUnboxingDelegate.UnboxingResponsible.assignUnboxedTo(TypeDescription targetType,
Assigner assigner,
boolean considerRuntimeType)
Attempts to unbox the represented type in order to assign the unboxed value to the given target type
while using the assigner that is provided by the method call.
|
StackManipulation |
PrimitiveWideningDelegate.widenTo(TypeDescription typeDescription)
Attempts to widen the represented type into another type.
|
Modifier and Type | Method and Description |
---|---|
StackManipulation |
ReferenceTypeAwareAssigner.assign(TypeDescription sourceType,
TypeDescription targetType,
boolean considerRuntimeType) |
Modifier and Type | Interface and Description |
---|---|
protected static interface |
ArrayFactory.ArrayCreator
An array creator is responsible for providing correct byte code instructions for creating an array
and for storing values into it.
|
Modifier and Type | Class and Description |
---|---|
static class |
ArrayFactory.ArrayCreator.Primitive
An array creator implementation for primitive types.
|
static class |
ArrayFactory.ArrayCreator.Reference
An array creator implementation for reference types.
|
Modifier and Type | Method and Description |
---|---|
StackManipulation |
CollectionFactory.withValues(List<StackManipulation> stackManipulations)
Applies this collection factory in order to build a new collection where each element is represented by
the given stack manipulations.
|
StackManipulation |
ArrayFactory.withValues(List<StackManipulation> stackManipulations) |
Modifier and Type | Method and Description |
---|---|
StackManipulation |
CollectionFactory.withValues(List<StackManipulation> stackManipulations)
Applies this collection factory in order to build a new collection where each element is represented by
the given stack manipulations.
|
StackManipulation |
ArrayFactory.withValues(List<StackManipulation> stackManipulations) |
Modifier and Type | Class and Description |
---|---|
class |
ClassConstant
Represents a constant representing a loaded Java
Class . |
class |
DefaultValue
Represents a stack assignment that loads the default value of a given type onto the stack.
|
class |
DoubleConstant
This class is responsible for loading any
double constant onto the operand stack. |
class |
FloatConstant
This class is responsible for loading any
float constant onto the operand stack. |
class |
IntegerConstant
This class is responsible for loading any
int constant onto the operand stack. |
class |
LongConstant
This class is responsible for loading any
long constant onto the operand stack. |
class |
MethodConstant
Represents the creation of a
Method value which can be created from a given
set of constant pool values and can therefore be considered a constant in the broader meaing. |
class |
NullConstant
Represents a stack manipulation to load a
null pointer onto the operand stack. |
class |
TextConstant
Represents a
String value that is stored in a type's constant pool. |
Modifier and Type | Method and Description |
---|---|
static StackManipulation |
MethodConstant.forMethod(MethodDescription methodDescription)
Creates a stack manipulation that loads a method constant onto the operand stack.
|
static StackManipulation |
IntegerConstant.forValue(boolean value)
Creates a stack manipulation for loading a boolean value onto the stack.
|
static StackManipulation |
DoubleConstant.forValue(double value)
Creates a stack manipulation for loading a
double value onto the operand stack. |
static StackManipulation |
FloatConstant.forValue(float value)
Creates a stack manipulation for loading a
float value onto the operand stack. |
static StackManipulation |
IntegerConstant.forValue(int value)
Creates a stack manipulation for loading an
int value onto the stack. |
static StackManipulation |
LongConstant.forValue(long value)
Creates a stack manipulation for loading a
long value onto the operand stack. |
static StackManipulation |
DefaultValue.of(TypeDescription typeDescription)
Creates a stack assignment that loads the default value for a given type.
|
Modifier and Type | Interface and Description |
---|---|
static interface |
MethodInvocation.WithImplicitInvocationTargetType
Represents a method invocation where the invocation type (static, virtual, special, interface) is derived
from the
|
Modifier and Type | Class and Description |
---|---|
class |
MethodReturn
A stack manipulation returning a value of a given type.
|
Modifier and Type | Method and Description |
---|---|
StackManipulation |
FieldAccess.Defined.getter()
Creates a getter representation for a given field.
|
static StackManipulation |
MethodVariableAccess.loadArguments(MethodDescription methodDescription) |
StackManipulation |
MethodVariableAccess.loadFromIndex(int variableOffset)
Creates a stack assignment for a given index of the local variable array.
|
static StackManipulation |
MethodVariableAccess.loadThisAndArguments(MethodDescription methodDescription)
Loads all method parameters for a given method, including a reference to the object instance if the method is
not static.
|
StackManipulation |
FieldAccess.Defined.putter()
Creates a putter representation for a given field.
|
static StackManipulation |
MethodReturn.returning(TypeDescription typeDescription)
Returns a method return corresponding to a given type.
|
StackManipulation |
MethodInvocation.WithImplicitInvocationTargetType.special(TypeDescription invocationTarget)
Transforms this method invocation into a special invocation on the given type.
|
StackManipulation |
MethodInvocation.WithImplicitInvocationTargetType.virtual(TypeDescription invocationTarget)
Transforms this method invocation into a virtual (or interface) method invocation on the given type.
|
Modifier and Type | Class and Description |
---|---|
static class |
MethodCallProxy.AssignableSignatureCall
A stack manipulation that creates a
MethodCallProxy
for a given method an pushes such an object onto the call stack. |
static class |
TypeProxy.ByConstructor
Loads a type proxy onto the operand stack which is created by calling one of its constructors.
|
static class |
TypeProxy.ByReflectionFactory
Loads a type proxy onto the operand stack which is created by constructing a serialization constructor using
the Oracle JDK's
ReflectionFactory.newConstructorForSerialization(Class, java.lang.reflect.Constructor)
method which might not be available in any Java runtime. |
Copyright © 2014. All rights reserved.