Package | Description |
---|---|
net.bytebuddy |
Byte Buddy is a library for creating Java classes at runtime of a Java program.
|
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.dynamic.scaffold.subclass |
All classes and types in this package are related to creating a
DynamicType by
creating a subclass of a given type. |
net.bytebuddy.implementation |
The implementation package contains any logic for intercepting method calls.
|
net.bytebuddy.implementation.auxiliary |
Auxiliary types describe helper types that aid as a supplementary to a given
InstrumentedType . |
Modifier and Type | Field and Description |
---|---|
protected MethodGraph.Compiler |
ByteBuddy.methodGraphCompiler
The method graph compiler to use.
|
Modifier and Type | Method and Description |
---|---|
ByteBuddy |
ByteBuddy.withMethodGraphCompiler(MethodGraph.Compiler methodGraphCompiler)
Defines a new method graph compiler to be used for extracting a type's invokable methods.
|
ByteBuddy |
ByteBuddy.Proxy.withMethodGraphCompiler(MethodGraph.Compiler methodGraphCompiler) |
Constructor and Description |
---|
ByteBuddy(ClassFileVersion classFileVersion,
NamingStrategy.Unbound namingStrategy,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
Implementation.Context.Factory implementationContextFactory,
List<TypeDescription> interfaceTypes,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper classVisitorWrapper,
MethodRegistry methodRegistry,
ByteBuddy.Definable<Integer> modifiers,
TypeAttributeAppender typeAttributeAppender,
MethodGraph.Compiler methodGraphCompiler,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory)
Defines a new
ByteBuddy configuration. |
MethodAnnotationTarget(ClassFileVersion classFileVersion,
NamingStrategy.Unbound namingStrategy,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
Implementation.Context.Factory implementationContextFactory,
List<TypeDescription> interfaceTypes,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper classVisitorWrapper,
MethodRegistry methodRegistry,
ByteBuddy.Definable<Integer> modifiers,
TypeAttributeAppender typeAttributeAppender,
MethodGraph.Compiler methodGraphCompiler,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
LatentMethodMatcher methodMatcher,
MethodRegistry.Handler handler,
MethodAttributeAppender.Factory attributeAppenderFactory,
MethodTransformer methodTransformer)
Creates a new method annotation target.
|
OptionalMethodInterception(ClassFileVersion classFileVersion,
NamingStrategy.Unbound namingStrategy,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
Implementation.Context.Factory implementationContextFactory,
List<TypeDescription> interfaceTypes,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper classVisitorWrapper,
MethodRegistry methodRegistry,
ByteBuddy.Definable<Integer> modifiers,
TypeAttributeAppender typeAttributeAppender,
MethodGraph.Compiler methodGraphCompiler,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
LatentMethodMatcher methodMatcher)
Creates a new optional method interception.
|
Proxy(ClassFileVersion classFileVersion,
NamingStrategy.Unbound namingStrategy,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
Implementation.Context.Factory implementationContextFactory,
List<TypeDescription> interfaceTypes,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper classVisitorWrapper,
MethodRegistry methodRegistry,
ByteBuddy.Definable<Integer> modifiers,
TypeAttributeAppender typeAttributeAppender,
MethodGraph.Compiler methodGraphCompiler,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory)
Defines a new proxy configuration for
ByteBuddy . |
Modifier and Type | Field and Description |
---|---|
protected MethodGraph.Compiler |
DynamicType.Builder.AbstractBase.methodGraphCompiler
The method graph compiler to be used.
|
Modifier and Type | Method and Description |
---|---|
protected abstract DynamicType.Builder<S> |
DynamicType.Builder.AbstractBase.materialize(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
Implementation.Context.Factory implementationContextFactory,
TypeDescription targetType,
List<GenericTypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper classVisitorWrapper,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodGraph.Compiler methodGraphCompiler,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
List<FieldDescription.Token> fieldTokens,
List<MethodDescription.Token> methodTokens)
Creates a new immutable type builder which represents the given arguments.
|
DynamicType.Builder<T> |
DynamicType.Builder.methodGraphCompiler(MethodGraph.Compiler methodGraphCompiler)
Defines the given method graph compiler to be used for analyzing the structure of types.
|
DynamicType.Builder<S> |
DynamicType.Builder.AbstractBase.methodGraphCompiler(MethodGraph.Compiler methodGraphCompiler) |
DynamicType.Builder<U> |
DynamicType.Builder.AbstractBase.AbstractDelegatingBuilder.methodGraphCompiler(MethodGraph.Compiler methodGraphCompiler) |
Constructor and Description |
---|
AbstractBase(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
Implementation.Context.Factory implementationContextFactory,
TypeDescription targetType,
List<GenericTypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper classVisitorWrapper,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodGraph.Compiler methodGraphCompiler,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
List<FieldDescription.Token> fieldTokens,
List<MethodDescription.Token> methodTokens)
Creates a new immutable type builder base implementation.
|
Modifier and Type | Class and Description |
---|---|
static class |
MethodGraph.Compiler.AbstractBase
An abstract base implementation of a method graph compiler.
|
static class |
MethodGraph.Compiler.Default<T>
A default implementation of a method graph.
|
static class |
MethodGraph.Empty
A canonical implementation of an empty method graph.
|
Modifier and Type | Field and Description |
---|---|
static MethodGraph.Compiler |
MethodGraph.Compiler.DEFAULT
The default compiler for compiling Java methods.
|
Modifier and Type | Method and Description |
---|---|
static MethodGraph.Compiler |
MethodGraph.Compiler.Default.forJavaHierarchy()
Creates a default compiler for a method hierarchy following the rules of the Java programming language.
|
static MethodGraph.Compiler |
MethodGraph.Compiler.Default.forJVMHierarchy()
Creates a default compiler for a method hierarchy following the rules of the Java virtual machine.
|
static <S> MethodGraph.Compiler |
MethodGraph.Compiler.Default.of(MethodGraph.Compiler.Default.Harmonizer<S> harmonizer,
MethodGraph.Compiler.Default.Merger merger)
Creates a default compiler using the given harmonizer and merger.
|
Modifier and Type | Method and Description |
---|---|
MethodRegistry.Prepared |
MethodRegistry.prepare(InstrumentedType instrumentedType,
MethodGraph.Compiler methodGraphCompiler,
LatentMethodMatcher methodFilter)
Prepares this method registry.
|
MethodRegistry.Prepared |
MethodRegistry.Default.prepare(InstrumentedType instrumentedType,
MethodGraph.Compiler methodGraphCompiler,
LatentMethodMatcher methodFilter) |
Modifier and Type | Method and Description |
---|---|
protected DynamicType.Builder<T> |
RedefinitionDynamicTypeBuilder.materialize(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
Implementation.Context.Factory implementationContextFactory,
TypeDescription levelType,
List<GenericTypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper classVisitorWrapper,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodGraph.Compiler methodGraphCompiler,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
List<FieldDescription.Token> fieldTokens,
List<MethodDescription.Token> methodTokens) |
protected DynamicType.Builder<T> |
RebaseDynamicTypeBuilder.materialize(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
Implementation.Context.Factory implementationContextFactory,
TypeDescription levelType,
List<GenericTypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper classVisitorWrapper,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodGraph.Compiler methodGraphCompiler,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
List<FieldDescription.Token> fieldTokens,
List<MethodDescription.Token> methodTokens) |
Constructor and Description |
---|
RebaseDynamicTypeBuilder(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
Implementation.Context.Factory implementationContextFactory,
TypeDescription levelType,
List<GenericTypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper classVisitorWrapper,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodGraph.Compiler methodGraphCompiler,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
List<FieldDescription.Token> fieldTokens,
List<MethodDescription.Token> methodTokens,
ClassFileLocator classFileLocator,
MethodRebaseResolver.MethodNameTransformer methodNameTransformer)
Creates a new rebase dynamic type builder.
|
RebaseDynamicTypeBuilder(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
Implementation.Context.Factory implementationContextFactory,
TypeDescription levelType,
List<TypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper classVisitorWrapper,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodGraph.Compiler methodGraphCompiler,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
ClassFileLocator classFileLocator,
MethodRebaseResolver.MethodNameTransformer methodNameTransformer)
Creates a new rebase dynamic type builder.
|
RedefinitionDynamicTypeBuilder(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
Implementation.Context.Factory implementationContextFactory,
TypeDescription levelType,
List<GenericTypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper classVisitorWrapper,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodGraph.Compiler methodGraphCompiler,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
List<FieldDescription.Token> fieldTokens,
List<MethodDescription.Token> methodTokens,
ClassFileLocator classFileLocator)
Creates a new redefinition dynamic type builder.
|
RedefinitionDynamicTypeBuilder(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
Implementation.Context.Factory implementationContextFactory,
TypeDescription levelType,
List<TypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper classVisitorWrapper,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodGraph.Compiler methodGraphCompiler,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
ClassFileLocator classFileLocator)
Creates a new redefinition dynamic type builder.
|
Modifier and Type | Method and Description |
---|---|
protected DynamicType.Builder<T> |
SubclassDynamicTypeBuilder.materialize(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
Implementation.Context.Factory implementationContextFactory,
TypeDescription targetType,
List<GenericTypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper classVisitorWrapper,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodGraph.Compiler methodGraphCompiler,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
List<FieldDescription.Token> fieldTokens,
List<MethodDescription.Token> methodTokens) |
Constructor and Description |
---|
SubclassDynamicTypeBuilder(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
Implementation.Context.Factory implementationContextFactory,
TypeDescription superType,
List<GenericTypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper classVisitorWrapper,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodGraph.Compiler methodGraphCompiler,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
List<FieldDescription.Token> fieldTokens,
List<MethodDescription.Token> methodTokens,
ConstructorStrategy constructorStrategy)
Creates a new immutable type builder for a subclassing a given class.
|
SubclassDynamicTypeBuilder(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
Implementation.Context.Factory implementationContextFactory,
TypeDescription superType,
List<TypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper classVisitorWrapper,
FieldRegistry fieldRegistry,
MethodRegistry methodRegistry,
MethodGraph.Compiler methodGraphCompiler,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory,
ConstructorStrategy constructorStrategy)
Creates a new immutable type builder for a subclassing a given class.
|
Modifier and Type | Method and Description |
---|---|
static MethodDelegation |
MethodDelegation.to(Object delegate,
Class<?> type,
MethodGraph.Compiler methodGraphCompiler)
Creates an implementation where only instance methods of the given object are considered as binding targets.
|
static MethodDelegation |
MethodDelegation.to(Object delegate,
Class<?> type,
String fieldName,
MethodGraph.Compiler methodGraphCompiler)
Creates an implementation where only instance methods of the given object are considered as binding targets.
|
static MethodDelegation |
MethodDelegation.to(Object delegate,
MethodGraph.Compiler methodGraphCompiler)
Creates an implementation where only instance methods of the given object are considered as binding targets.
|
static MethodDelegation |
MethodDelegation.to(Object delegate,
String fieldName,
MethodGraph.Compiler methodGraphCompiler)
Creates an implementation where only instance methods of the given object are considered as binding targets.
|
static MethodDelegation |
MethodDelegation.toInstanceField(Class<?> type,
String fieldName,
MethodGraph.Compiler methodGraphCompiler)
Creates an implementation where method calls are delegated to an instance that is manually stored in a field
fieldName that is defined for the instrumented type. |
static MethodDelegation |
MethodDelegation.toInstanceField(TypeDescription typeDescription,
String fieldName,
MethodGraph.Compiler methodGraphCompiler)
Creates an implementation where method calls are delegated to an instance that is manually stored in a field
fieldName that is defined for the instrumented type. |
Constructor and Description |
---|
ForVirtualMethods(MethodGraph.Compiler methodGraphCompiler,
TypeDescription targetType)
Creates a new method container for virtual method extraction.
|
Modifier and Type | Class and Description |
---|---|
protected static class |
MethodCallProxy.PrecomputedMethodGraph
A precomputed method graph that only displays the methods that are relevant for creating a method call proxy.
|
Copyright © 2014–2015. All rights reserved.