Package | Description |
---|---|
net.bytebuddy |
Byte Buddy is a library for creating Java classes at runtime of a Java program.
|
net.bytebuddy.agent.builder |
An agent builder is used to easily implement load-time class-transformations using a Java agent.
|
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.instrumentation |
The instrumentation package contains any logic for intercepting method calls.
|
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.type.auxiliary |
Auxiliary types describe helper types that aid as a supplementary to a given
InstrumentedType . |
Modifier and Type | Field and Description |
---|---|
protected Instrumentation |
ByteBuddy.MethodAnnotationTarget.instrumentation
The instrumentation that was defined for the current method selection.
|
Modifier and Type | Method and Description |
---|---|
ByteBuddy.MethodAnnotationTarget |
ByteBuddy.MethodInterceptable.intercept(Instrumentation instrumentation)
Intercepts the given method with the given instrumentation.
|
ByteBuddy.MethodAnnotationTarget |
ByteBuddy.OptionalMethodInterception.intercept(Instrumentation instrumentation) |
ByteBuddy.MethodAnnotationTarget |
ByteBuddy.MatchedMethodInterception.intercept(Instrumentation instrumentation) |
Constructor and Description |
---|
MethodAnnotationTarget(ClassFileVersion classFileVersion,
NamingStrategy.Unbound namingStrategy,
List<TypeDescription> interfaceTypes,
ElementMatcher<? super MethodDescription> ignoredMethods,
BridgeMethodResolver.Factory bridgeMethodResolverFactory,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
MethodRegistry methodRegistry,
ByteBuddy.Definable<Integer> modifiers,
TypeAttributeAppender typeAttributeAppender,
MethodLookupEngine.Factory methodLookupEngineFactory,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
ElementMatcher<? super MethodDescription> methodMatcher,
Instrumentation instrumentation,
MethodAttributeAppender.Factory attributeAppenderFactory)
Creates a new method annotation target.
|
Modifier and Type | Class and Description |
---|---|
static class |
AgentBuilder.Default.InitializationStrategy.SelfInjection
An initialization strategy that adds a code block to an instrumented type's type initializer which
then calls a specific class that is responsible for the explicit initialization.
|
Modifier and Type | Method and Description |
---|---|
DynamicType.Builder.MethodAnnotationTarget<T> |
DynamicType.Builder.MatchedMethodInterception.intercept(Instrumentation instrumentation)
Intercepts the currently selected method by a given instrumentation.
|
DynamicType.Builder.MethodAnnotationTarget<S> |
DynamicType.Builder.AbstractBase.DefaultMatchedMethodInterception.intercept(Instrumentation instrumentation) |
DynamicType.Builder.MethodAnnotationTarget<S> |
DynamicType.Builder.AbstractBase.DefaultExceptionDeclarableMethodInterception.intercept(Instrumentation instrumentation) |
DynamicType.Builder.MethodAnnotationTarget<S> |
DynamicType.Builder.AbstractBase.DefaultOptionalMatchedMethodInterception.intercept(Instrumentation instrumentation) |
Modifier and Type | Method and Description |
---|---|
Instrumentation |
MethodRegistry.Default.Entry.getInstrumentation()
Returns this entry's instrumentation.
|
Modifier and Type | Method and Description |
---|---|
MethodRegistry |
MethodRegistry.append(MethodRegistry.LatentMethodMatcher latentMethodMatcher,
Instrumentation instrumentation,
MethodAttributeAppender.Factory attributeAppenderFactory)
Creates a new method registry with a new compilable entry representing the arguments of this method call.
|
MethodRegistry |
MethodRegistry.Default.append(MethodRegistry.LatentMethodMatcher latentMethodMatcher,
Instrumentation instrumentation,
MethodAttributeAppender.Factory attributeAppenderFactory) |
MethodRegistry |
MethodRegistry.prepend(MethodRegistry.LatentMethodMatcher latentMethodMatcher,
Instrumentation instrumentation,
MethodAttributeAppender.Factory attributeAppenderFactory)
Creates a new method registry with a new compilable entry representing the arguments of this method call.
|
MethodRegistry |
MethodRegistry.Default.prepend(MethodRegistry.LatentMethodMatcher latentMethodMatcher,
Instrumentation instrumentation,
MethodAttributeAppender.Factory attributeAppenderFactory) |
Constructor and Description |
---|
Entry(MethodRegistry.LatentMethodMatcher latentMethodMatcher,
Instrumentation instrumentation,
MethodAttributeAppender.Factory attributeAppenderFactory)
Creates a new entry.
|
Modifier and Type | Interface and Description |
---|---|
static interface |
FieldAccessor.AssignerConfigurable
A field accessor that can be configured to use a given assigner and runtime type use configuration.
|
static interface |
FieldAccessor.FieldDefinable
Determines a field accessor that accesses a field of a given name which might not yet be
defined.
|
static interface |
FieldAccessor.OwnerTypeLocatable
A field accessor that can be configured to locate a field in a specific manner.
|
static interface |
FixedValue.AssignerConfigurable
Represents a fixed value instrumentation that is using a default assigner for attempting to assign
the fixed value to the return type of the instrumented method.
|
protected static interface |
InvocationHandlerAdapter.AssignerConfigurable
Allows for the configuration of an
Assigner
of an InvocationHandlerAdapter . |
Modifier and Type | Class and Description |
---|---|
class |
DefaultMethodCall
This
Instrumentation invokes a default method for the methods it instruments. |
class |
ExceptionMethod
This instrumentation causes a
Throwable to be thrown when the instrumented method is invoked. |
class |
FieldAccessor
Defines a method to access a given field by following the Java bean conventions for getters and setters:
Getter: A method named
getFoo() will be instrumented to read and return the value of a field foo
or another field if one was specified explicitly. |
protected static class |
FieldAccessor.ForNamedField
Implementation of a field accessor instrumentation where the field name is given explicitly.
|
protected static class |
FieldAccessor.ForUnnamedField
Implementation of a field accessor instrumentation where a field is identified by a method's name following
the Java specification for bean properties.
|
class |
FixedValue
This instrumentation returns a fixed value for a method.
|
protected static class |
FixedValue.ForPoolValue
A fixed value instrumentation that represents its fixed value as a value that is written to the instrumented
class's constant pool.
|
protected static class |
FixedValue.ForStaticField
A fixed value instrumentation that represents its fixed value as a static field of the instrumented class.
|
class |
Forwarding
This instrumentation forwards method invocations to another instance.
|
static class |
Instrumentation.Compound
A compound instrumentation that allows to combine several instrumentations.
|
static class |
Instrumentation.ForAbstractMethod
An instrumentation for an abstract method that does not append any code and will throw an exception if it is
attempted to be composed with other methods that do provide an implementation.
|
static class |
Instrumentation.Simple
A simple implementation of an instrumentation that does not register any members with the instrumented type.
|
class |
InvocationHandlerAdapter
An adapter for adapting an
InvocationHandler . |
protected static class |
InvocationHandlerAdapter.ForInstanceDelegation
An implementation of an
InvocationHandlerAdapter that delegates method
invocations to an adapter that is stored in an instance field. |
protected static class |
InvocationHandlerAdapter.ForStaticDelegation
An implementation of an
InvocationHandlerAdapter that delegates method
invocations to an adapter that is stored in a static field. |
class |
InvokeDynamic
An instrumentation that applies a
dynamic method invocation.
|
static class |
InvokeDynamic.WithImplicitArguments
Representation of an
InvokeDynamic instrumentation where the bootstrapped
method is passed a this reference, if available, and any arguments of the instrumented method. |
static class |
InvokeDynamic.WithImplicitTarget
Representation of an
InvokeDynamic instrumentation where the bootstrapped
method is passed a this reference, if available, and any arguments of the instrumented method and
where the invocation target is implicit. |
class |
MethodCall
This
Instrumentation allows the invocation of a specified method while
providing explicit arguments to this method. |
static class |
MethodCall.WithoutSpecifiedTarget
Represents a
MethodCall that invokes a method without specifying
an invocation method. |
class |
MethodDelegation
This instrumentation delegates an method call to another method which can either be
static by providing
a reference to a Class or an instance method when another object is provided. |
class |
StubMethod
This instrumentation creates a method stub which does nothing but returning the default value of the return
type of the method.
|
class |
SuperMethodCall
This instrumentation will create a new method which simply calls its super method.
|
protected static class |
SuperMethodCall.WithoutReturn
A super method invocation where the return value is dropped instead of returning from the method.
|
Modifier and Type | Method and Description |
---|---|
Instrumentation |
SuperMethodCall.andThen(Instrumentation instrumentation)
Appends another instrumentation to a super method call.
|
Instrumentation |
MethodDelegation.andThen(Instrumentation instrumentation)
Appends another
Instrumentation to a method delegation. |
Instrumentation |
MethodCall.andThen(Instrumentation instrumentation)
Applies another instrumentation after invoking this method call.
|
Instrumentation |
InvokeDynamic.andThen(Instrumentation instrumentation)
Applies this invoke dynamic instrumentation and removes the return value of the bootstrapped method from
the operand stack before applying the provided instrumentation.
|
static Instrumentation |
FixedValue.nullValue()
Creates a fixed value instrumentation that returns
null as a fixed value. |
static Instrumentation |
DefaultMethodCall.prioritize(Class<?>... prioritizedInterface)
Creates a
DefaultMethodCall instrumentation which searches the given list
of interface types for a suitable default method in their order. |
static Instrumentation |
DefaultMethodCall.prioritize(TypeDescription... prioritizedInterface)
Creates a
DefaultMethodCall instrumentation which searches the given list
of interface types for a suitable default method in their order. |
static Instrumentation |
ExceptionMethod.throwing(Class<? extends Throwable> throwable)
Creates an instrumentation that creates a new instance of the given isThrowable type on each method invocation
which is then thrown immediately.
|
static Instrumentation |
ExceptionMethod.throwing(Class<? extends Throwable> exceptionType,
String message)
Creates an instrumentation that creates a new instance of the given isThrowable type on each method invocation
which is then thrown immediately.
|
static Instrumentation |
ExceptionMethod.throwing(TypeDescription throwable)
Creates an instrumentation that creates a new instance of the given isThrowable type on each method invocation
which is then thrown immediately.
|
static Instrumentation |
ExceptionMethod.throwing(TypeDescription exceptionType,
String message)
Creates an instrumentation that creates a new instance of the given isThrowable type on each method invocation
which is then thrown immediately.
|
static Instrumentation |
Forwarding.to(Object delegate)
Forwards all intercepted method invocations to the given instance which is stored in a
static field
of the instrumented class. |
static Instrumentation |
Forwarding.to(Object delegate,
String fieldName)
Forwards all intercepted method invocations to the given instance which is stored in a
static field
of the instrumented class. |
static Instrumentation |
Forwarding.toInstanceField(String fieldName,
Class<?> fieldType)
Forwards all intercepted method invocations to an instance field of the instrumented class.
|
static Instrumentation |
Forwarding.toInstanceField(String fieldName,
TypeDescription fieldType)
Forwards all intercepted method invocations to an instance field of the instrumented class.
|
static Instrumentation |
Forwarding.toStaticField(String fieldName,
Class<?> fieldType)
Forwards all intercepted method invocations to a
static field of the instrumented class. |
static Instrumentation |
Forwarding.toStaticField(String fieldName,
TypeDescription fieldType)
Forwards all intercepted method invocations to a
static field of the instrumented class. |
static Instrumentation |
DefaultMethodCall.unambiguousOnly()
Creates a
DefaultMethodCall instrumentation without prioritizing any
interface. |
Instrumentation |
InvocationHandlerAdapter.AssignerConfigurable.withAssigner(Assigner assigner)
Configures an assigner to use with this invocation handler adapter.
|
Instrumentation |
InvocationHandlerAdapter.ForStaticDelegation.withAssigner(Assigner assigner) |
Instrumentation |
InvocationHandlerAdapter.ForInstanceDelegation.withAssigner(Assigner assigner) |
Instrumentation |
FixedValue.AssignerConfigurable.withAssigner(Assigner assigner,
boolean dynamicallyTyped)
Defines an explicit assigner to this fixed value instrumentation.
|
Instrumentation |
FixedValue.ForPoolValue.withAssigner(Assigner assigner,
boolean dynamicallyTyped) |
Instrumentation |
FixedValue.ForStaticField.withAssigner(Assigner assigner,
boolean dynamicallyTyped) |
Instrumentation |
FieldAccessor.AssignerConfigurable.withAssigner(Assigner assigner,
boolean dynamicallyTyped)
Returns a field accessor that is identical to this field accessor but uses the given assigner
and runtime type use configuration.
|
Instrumentation |
FieldAccessor.ForUnnamedField.withAssigner(Assigner assigner,
boolean dynamicallyTyped) |
Instrumentation |
FieldAccessor.ForNamedField.withAssigner(Assigner assigner,
boolean dynamicallyTyped) |
Modifier and Type | Method and Description |
---|---|
Instrumentation |
SuperMethodCall.andThen(Instrumentation instrumentation)
Appends another instrumentation to a super method call.
|
Instrumentation |
MethodDelegation.andThen(Instrumentation instrumentation)
Appends another
Instrumentation to a method delegation. |
Instrumentation |
MethodCall.andThen(Instrumentation instrumentation)
Applies another instrumentation after invoking this method call.
|
Instrumentation |
InvokeDynamic.andThen(Instrumentation instrumentation)
Applies this invoke dynamic instrumentation and removes the return value of the bootstrapped method from
the operand stack before applying the provided instrumentation.
|
Constructor and Description |
---|
Compound(Instrumentation... instrumentation)
Creates a new immutable compound instrumentation.
|
Modifier and Type | Class and Description |
---|---|
protected static class |
Field.Binder.AccessType.Getter
Instrumentation for a getter method.
|
protected static class |
Field.Binder.AccessType.Setter
Instrumentation for a setter method.
|
protected static class |
Field.Binder.InstanceFieldConstructor
Represents an instrumentation for implementing a proxy type constructor when a non-static field is accessed.
|
protected static class |
Field.Binder.StaticFieldConstructor
Represents an instrumentation for implementing a proxy type constructor when a static field is accessed.
|
protected static class |
Morph.Binder.RedirectionProxy.InstanceFieldConstructor
Creates an instance of the proxy when instrumenting an instance method.
|
protected static class |
Morph.Binder.RedirectionProxy.MethodCall
Implements a the method call of the morphing method.
|
protected static class |
Morph.Binder.RedirectionProxy.StaticFieldConstructor
Creates an instance of the proxy when instrumenting a static method.
|
protected static class |
Pipe.Binder.Redirection.ConstructorCall
The instrumentation to implement a
Pipe.Binder.Redirection 's
constructor. |
protected static class |
Pipe.Binder.Redirection.MethodCall
The instrumentation to implement a
Pipe.Binder.Redirection 's
forwarding method. |
Modifier and Type | Method and Description |
---|---|
protected abstract Instrumentation |
Field.Binder.AccessType.access(FieldDescription fieldDescription,
Assigner assigner,
AuxiliaryType.MethodAccessorFactory methodAccessorFactory)
Returns an instrumentation that implements the sort of accessor implementation that is represented by
this instance.
|
Modifier and Type | Class and Description |
---|---|
protected static class |
MethodCallProxy.ConstructorCall
An instrumentation for implementing a constructor of a
MethodCallProxy . |
protected static class |
MethodCallProxy.MethodCall
An instrumentation for implementing a method of a
MethodCallProxy . |
protected class |
TypeProxy.MethodCall
An instrumentation for implementing a method call of a
TypeProxy . |
protected static class |
TypeProxy.SilentConstruction
An implementation of a silent construction of a given type by using the non-standardized
ReflectionFactory . |
Copyright © 2014–2015. All rights reserved.