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 . |
net.bytebuddy.implementation.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.
|
Modifier and Type | Field and Description |
---|---|
protected ClassFileVersion |
ByteBuddy.classFileVersion
The class file version of the current configuration.
|
static ClassFileVersion |
ClassFileVersion.JAVA_V1
The class file version of Java 1.
|
static ClassFileVersion |
ClassFileVersion.JAVA_V2
The class file version of Java 2.
|
static ClassFileVersion |
ClassFileVersion.JAVA_V3
The class file version of Java 3.
|
static ClassFileVersion |
ClassFileVersion.JAVA_V4
The class file version of Java 4.
|
static ClassFileVersion |
ClassFileVersion.JAVA_V5
The class file version of Java 5.
|
static ClassFileVersion |
ClassFileVersion.JAVA_V6
The class file version of Java 6.
|
static ClassFileVersion |
ClassFileVersion.JAVA_V7
The class file version of Java 7.
|
static ClassFileVersion |
ClassFileVersion.JAVA_V8
The class file version of Java 8.
|
static ClassFileVersion |
ClassFileVersion.JAVA_V9
The class file version of Java 9.
|
Modifier and Type | Method and Description |
---|---|
static ClassFileVersion |
ClassFileVersion.forCurrentJavaVersion()
Finds the highest class file version that is compatible to the current JVM version by parsing the java.version
property which is provided by
System.getProperty(String) . |
static ClassFileVersion |
ClassFileVersion.forKnownJavaVersion(int javaVersion)
Creates a class file version for a given major release of Java.
|
ClassFileVersion |
NamingStrategy.UnnamedType.getClassFileVersion()
Returns the class file version of this unnamed type.
|
ClassFileVersion |
NamingStrategy.UnnamedType.Default.getClassFileVersion() |
ClassFileVersion |
ByteBuddy.getClassFileVersion()
Returns the class file version that is defined for the current configuration.
|
ClassFileVersion |
ByteBuddy.Proxy.getClassFileVersion() |
Modifier and Type | Method and Description |
---|---|
int |
ClassFileVersion.compareTo(ClassFileVersion other) |
ByteBuddy |
ByteBuddy.withClassFileVersion(ClassFileVersion classFileVersion)
Defines a new class file version for this configuration.
|
ByteBuddy |
ByteBuddy.Proxy.withClassFileVersion(ClassFileVersion classFileVersion) |
Constructor and Description |
---|
ByteBuddy(ClassFileVersion classFileVersion)
Defines a new
ByteBuddy default configuration for the given class file version. |
ByteBuddy(ClassFileVersion classFileVersion,
NamingStrategy.Unbound namingStrategy,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
List<TypeDescription> interfaceTypes,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
MethodRegistry methodRegistry,
ByteBuddy.Definable<Integer> modifiers,
TypeAttributeAppender typeAttributeAppender,
MethodGraph.Compiler methodGraphCompiler,
FieldAttributeAppender.Factory defaultFieldAttributeAppenderFactory,
MethodAttributeAppender.Factory defaultMethodAttributeAppenderFactory)
Defines a new
ByteBuddy configuration. |
Default(GenericTypeDescription superClass,
List<? extends GenericTypeDescription> interfaces,
int modifiers,
ClassFileVersion classFileVersion)
Creates a new unnamed type.
|
MethodAnnotationTarget(ClassFileVersion classFileVersion,
NamingStrategy.Unbound namingStrategy,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
List<TypeDescription> interfaceTypes,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
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,
List<TypeDescription> interfaceTypes,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
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,
List<TypeDescription> interfaceTypes,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
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 ClassFileVersion |
DynamicType.Builder.AbstractBase.classFileVersion
The class file version specified for this builder.
|
Modifier and Type | Method and Description |
---|---|
DynamicType.Builder<T> |
DynamicType.Builder.classFileVersion(ClassFileVersion classFileVersion)
Defines a class file format version for this builder for which the dynamic types should be created.
|
DynamicType.Builder<S> |
DynamicType.Builder.AbstractBase.classFileVersion(ClassFileVersion classFileVersion) |
DynamicType.Builder<U> |
DynamicType.Builder.AbstractBase.AbstractDelegatingBuilder.classFileVersion(ClassFileVersion classFileVersion) |
protected abstract DynamicType.Builder<S> |
DynamicType.Builder.AbstractBase.materialize(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
TypeDescription targetType,
List<GenericTypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
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.
|
Constructor and Description |
---|
AbstractBase(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
TypeDescription targetType,
List<GenericTypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
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 | Field and Description |
---|---|
protected ClassFileVersion |
TypeWriter.Default.classFileVersion
The class file version of the written type.
|
Modifier and Type | Method and Description |
---|---|
static <U> TypeWriter<U> |
TypeWriter.Default.forCreation(MethodRegistry.Compiled methodRegistry,
TypeWriter.FieldPool fieldPool,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
ClassVisitorWrapper classVisitorWrapper,
TypeAttributeAppender attributeAppender,
ClassFileVersion classFileVersion)
Creates a type writer for creating a new type.
|
static <U> TypeWriter<U> |
TypeWriter.Default.forRebasing(MethodRegistry.Compiled methodRegistry,
TypeWriter.FieldPool fieldPool,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
ClassVisitorWrapper classVisitorWrapper,
TypeAttributeAppender attributeAppender,
ClassFileVersion classFileVersion,
ClassFileLocator classFileLocator,
TypeDescription targetType,
MethodRebaseResolver methodRebaseResolver)
Creates a type writer for creating a new type.
|
static <U> TypeWriter<U> |
TypeWriter.Default.forRedefinition(MethodRegistry.Compiled methodRegistry,
TypeWriter.FieldPool fieldPool,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
ClassVisitorWrapper classVisitorWrapper,
TypeAttributeAppender attributeAppender,
ClassFileVersion classFileVersion,
ClassFileLocator classFileLocator,
TypeDescription targetType)
Creates a type writer for creating a new type.
|
Constructor and Description |
---|
Default(TypeDescription instrumentedType,
LoadedTypeInitializer loadedTypeInitializer,
InstrumentedType.TypeInitializer typeInitializer,
List<DynamicType> explicitAuxiliaryTypes,
ClassFileVersion classFileVersion,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
ClassVisitorWrapper classVisitorWrapper,
TypeAttributeAppender attributeAppender,
TypeWriter.FieldPool fieldPool,
TypeWriter.MethodPool methodPool,
MethodList<?> instrumentedMethods)
Creates a new default type writer.
|
ForClassFileVersion(ClassFileVersion classFileVersion)
Creates a new constraint for the given class file version.
|
ForCreation(TypeDescription instrumentedType,
LoadedTypeInitializer loadedTypeInitializer,
InstrumentedType.TypeInitializer typeInitializer,
List<DynamicType> explicitAuxiliaryTypes,
ClassFileVersion classFileVersion,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
ClassVisitorWrapper classVisitorWrapper,
TypeAttributeAppender attributeAppender,
TypeWriter.FieldPool fieldPool,
TypeWriter.MethodPool methodPool,
MethodList instrumentedMethods)
Creates a new type writer for creating a new type.
|
ForInlining(TypeDescription instrumentedType,
LoadedTypeInitializer loadedTypeInitializer,
InstrumentedType.TypeInitializer typeInitializer,
List<DynamicType> explicitAuxiliaryTypes,
ClassFileVersion classFileVersion,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
ClassVisitorWrapper classVisitorWrapper,
TypeAttributeAppender attributeAppender,
TypeWriter.FieldPool fieldPool,
TypeWriter.MethodPool methodPool,
MethodList instrumentedMethods,
ClassFileLocator classFileLocator,
TypeDescription targetType,
MethodRebaseResolver methodRebaseResolver)
Creates a new type writer for inling a type into an existing type description.
|
Modifier and Type | Method and Description |
---|---|
static MethodRebaseResolver |
MethodRebaseResolver.Default.make(TypeDescription instrumentedType,
MethodList<MethodDescription.InDefinedShape> rebaseableMethods,
ClassFileVersion classFileVersion,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
MethodRebaseResolver.MethodNameTransformer methodNameTransformer)
Creates a new method rebase resolver.
|
protected DynamicType.Builder<T> |
RedefinitionDynamicTypeBuilder.materialize(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
TypeDescription levelType,
List<GenericTypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
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,
TypeDescription levelType,
List<GenericTypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
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,
TypeDescription levelType,
List<GenericTypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
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,
TypeDescription levelType,
List<TypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
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,
TypeDescription levelType,
List<GenericTypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
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,
TypeDescription levelType,
List<TypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
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,
TypeDescription targetType,
List<GenericTypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
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,
TypeDescription superType,
List<GenericTypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
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,
TypeDescription superType,
List<TypeDescription> interfaceTypes,
int modifiers,
TypeAttributeAppender attributeAppender,
ElementMatcher<? super MethodDescription> ignoredMethods,
ClassVisitorWrapper.Chain classVisitorWrapperChain,
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.
|
Constructor and Description |
---|
Default(TypeDescription instrumentedType,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
InstrumentedType.TypeInitializer typeInitializer,
ClassFileVersion classFileVersion)
Creates a new implementation context.
|
Modifier and Type | Method and Description |
---|---|
DynamicType |
TypeProxy.make(String auxiliaryTypeName,
ClassFileVersion classFileVersion,
AuxiliaryType.MethodAccessorFactory methodAccessorFactory) |
DynamicType |
TrivialType.make(String auxiliaryTypeName,
ClassFileVersion classFileVersion,
AuxiliaryType.MethodAccessorFactory methodAccessorFactory) |
DynamicType |
MethodCallProxy.make(String auxiliaryTypeName,
ClassFileVersion classFileVersion,
AuxiliaryType.MethodAccessorFactory methodAccessorFactory) |
DynamicType |
AuxiliaryType.make(String auxiliaryTypeName,
ClassFileVersion classFileVersion,
AuxiliaryType.MethodAccessorFactory methodAccessorFactory)
Creates a new auxiliary type.
|
Modifier and Type | Method and Description |
---|---|
DynamicType |
Pipe.Binder.Redirection.make(String auxiliaryTypeName,
ClassFileVersion classFileVersion,
AuxiliaryType.MethodAccessorFactory methodAccessorFactory) |
DynamicType |
Morph.Binder.RedirectionProxy.make(String auxiliaryTypeName,
ClassFileVersion classFileVersion,
AuxiliaryType.MethodAccessorFactory methodAccessorFactory) |
DynamicType |
FieldProxy.Binder.AccessorProxy.make(String auxiliaryTypeName,
ClassFileVersion classFileVersion,
AuxiliaryType.MethodAccessorFactory methodAccessorFactory) |
Copyright © 2014–2015. All rights reserved.