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.dynamic.scaffold.inline |
All classes and types in this package are related to creating a
DynamicType by
enhancing a given type. |
net.bytebuddy.pool |
Classes of this package allow for the creating
TypeDescription s without
loading any classes. |
Modifier and Type | Method and Description |
---|---|
<T> DynamicType.Builder<T> |
ByteBuddy.rebase(Class<T> levelType,
ClassFileLocator classFileLocator)
Creates a dynamic type by weaving any changes into an already defined level type.
|
<T> DynamicType.Builder<T> |
ByteBuddy.Proxy.rebase(Class<T> levelType,
ClassFileLocator classFileLocator) |
<T> DynamicType.Builder<T> |
ByteBuddy.rebase(Class<T> levelType,
ClassFileLocator classFileLocator,
MethodRebaseResolver.MethodNameTransformer methodNameTransformer)
Creates a dynamic type by weaving any changes into an already defined level type.
|
<T> DynamicType.Builder<T> |
ByteBuddy.Proxy.rebase(Class<T> levelType,
ClassFileLocator classFileLocator,
MethodRebaseResolver.MethodNameTransformer methodNameTransformer) |
DynamicType.Builder<?> |
ByteBuddy.rebase(Package aPackage,
ClassFileLocator classFileLocator)
Rebases the given the package.
|
DynamicType.Builder<?> |
ByteBuddy.Proxy.rebase(Package aPackage,
ClassFileLocator classFileLocator) |
DynamicType.Builder<?> |
ByteBuddy.rebase(PackageDescription packageDescription,
ClassFileLocator classFileLocator)
Rebases the given the package.
|
DynamicType.Builder<?> |
ByteBuddy.Proxy.rebase(PackageDescription packageDescription,
ClassFileLocator classFileLocator) |
<T> DynamicType.Builder<T> |
ByteBuddy.rebase(TypeDescription levelType,
ClassFileLocator classFileLocator)
Creates a dynamic type by weaving any changes into an already defined level type.
|
<T> DynamicType.Builder<T> |
ByteBuddy.Proxy.rebase(TypeDescription levelType,
ClassFileLocator classFileLocator) |
<T> DynamicType.Builder<T> |
ByteBuddy.rebase(TypeDescription levelType,
ClassFileLocator classFileLocator,
MethodRebaseResolver.MethodNameTransformer methodNameTransformer)
Creates a dynamic type by weaving any changes into an already defined level type.
|
<T> DynamicType.Builder<T> |
ByteBuddy.Proxy.rebase(TypeDescription levelType,
ClassFileLocator classFileLocator,
MethodRebaseResolver.MethodNameTransformer methodNameTransformer) |
<T> DynamicType.Builder<T> |
ByteBuddy.redefine(Class<T> levelType,
ClassFileLocator classFileLocator)
Creates a dynamic type builder for redefining of the given type.
|
<T> DynamicType.Builder<T> |
ByteBuddy.Proxy.redefine(Class<T> levelType,
ClassFileLocator classFileLocator) |
<T> DynamicType.Builder<T> |
ByteBuddy.redefine(TypeDescription levelType,
ClassFileLocator classFileLocator)
Creates a dynamic type builder for redefining of the given type.
|
<T> DynamicType.Builder<T> |
ByteBuddy.Proxy.redefine(TypeDescription levelType,
ClassFileLocator classFileLocator) |
Modifier and Type | Method and Description |
---|---|
ClassFileLocator |
AgentBuilder.BinaryLocator.classFileLocator(ClassLoader classLoader)
Creates a class file locator for the given class loader.
|
ClassFileLocator |
AgentBuilder.BinaryLocator.Default.classFileLocator(ClassLoader classLoader) |
Modifier and Type | Method and Description |
---|---|
byte[] |
AgentBuilder.Default.Transformation.Resolution.apply(AgentBuilder.InitializationStrategy initializationStrategy,
ClassFileLocator classFileLocator,
AgentBuilder.TypeStrategy typeStrategy,
ByteBuddy byteBuddy,
AgentBuilder.Default.NativeMethodStrategy methodNameTransformer,
AgentBuilder.Default.BootstrapInjectionStrategy bootstrapInjectionStrategy,
AccessControlContext accessControlContext,
AgentBuilder.Listener listener)
Transforms a type or returns
null if a type is not to be transformed. |
byte[] |
AgentBuilder.Default.Transformation.Resolution.Unresolved.apply(AgentBuilder.InitializationStrategy initializationStrategy,
ClassFileLocator classFileLocator,
AgentBuilder.TypeStrategy typeStrategy,
ByteBuddy byteBuddy,
AgentBuilder.Default.NativeMethodStrategy methodNameTransformer,
AgentBuilder.Default.BootstrapInjectionStrategy bootstrapInjectionStrategy,
AccessControlContext accessControlContext,
AgentBuilder.Listener listener) |
byte[] |
AgentBuilder.Default.Transformation.Simple.Resolution.apply(AgentBuilder.InitializationStrategy initializationStrategy,
ClassFileLocator classFileLocator,
AgentBuilder.TypeStrategy typeStrategy,
ByteBuddy byteBuddy,
AgentBuilder.Default.NativeMethodStrategy methodNameTransformer,
AgentBuilder.Default.BootstrapInjectionStrategy bootstrapInjectionStrategy,
AccessControlContext accessControlContext,
AgentBuilder.Listener listener) |
DynamicType.Builder<?> |
AgentBuilder.TypeStrategy.builder(TypeDescription typeDescription,
ByteBuddy byteBuddy,
ClassFileLocator classFileLocator,
MethodRebaseResolver.MethodNameTransformer methodNameTransformer)
Creates a type builder for a given type.
|
protected ClassDefinition |
AgentBuilder.RedefinitionStrategy.Collector.ForRedefinition.Entry.resolve(AgentBuilder.InitializationStrategy initializationStrategy,
ClassFileLocator classFileLocator,
AgentBuilder.TypeStrategy typeStrategy,
ByteBuddy byteBuddy,
AgentBuilder.Default.NativeMethodStrategy nativeMethodStrategy,
AgentBuilder.Default.BootstrapInjectionStrategy bootstrapInjectionStrategy,
AccessControlContext accessControlContext,
AgentBuilder.Listener listener)
Resolves this entry into a fully defined class redefinition.
|
TypePool |
AgentBuilder.BinaryLocator.typePool(ClassFileLocator classFileLocator)
Creates a type pool for a given class file locator.
|
TypePool |
AgentBuilder.BinaryLocator.Default.typePool(ClassFileLocator classFileLocator) |
Modifier and Type | Class and Description |
---|---|
static class |
ClassFileLocator.AgentBased
A Java agent that allows the location of class files by emulating a retransformation.
|
static class |
ClassFileLocator.Compound
A compound
ClassFileLocator that chains several locators. |
static class |
ClassFileLocator.ForClassLoader
A class file locator that queries a class loader for binary representations of class files.
|
static class |
ClassFileLocator.ForFolder
A class file locator that finds files from a standardized Java folder structure with
folders donating packages and class files being saved as
<classname>.class files
within their package folder. |
static class |
ClassFileLocator.ForJarFile
A class file locator that locates classes within a Java jar file.
|
static class |
ClassFileLocator.NoOp
A class file locator that cannot locate any class files.
|
static class |
ClassFileLocator.Simple
A simple class file locator that returns class files from a selection of given types.
|
Modifier and Type | Method and Description |
---|---|
static ClassFileLocator |
ClassFileLocator.AgentBased.fromInstalledAgent(ClassLoader classLoader)
Returns an agent-based class file locator for the given class loader and an already installed
Byte Buddy-agent.
|
static ClassFileLocator |
ClassFileLocator.ForClassLoader.of(ClassLoader classLoader)
Creates a class file locator for a given class loader.
|
static ClassFileLocator |
ClassFileLocator.Simple.of(String typeName,
byte[] binaryRepresentation)
Creates a class file locator for a single known type.
|
static ClassFileLocator |
ClassFileLocator.Simple.of(String typeName,
byte[] binaryRepresentation,
ClassFileLocator fallback)
Creates a class file locator for a single known type with an additional fallback locator.
|
static ClassFileLocator |
ClassFileLocator.ForClassLoader.ofClassPath()
Creates a class file locator that queries the system class loader.
|
Modifier and Type | Method and Description |
---|---|
static ClassFileLocator |
ClassFileLocator.Simple.of(String typeName,
byte[] binaryRepresentation,
ClassFileLocator fallback)
Creates a class file locator for a single known type with an additional fallback locator.
|
Constructor and Description |
---|
Compound(ClassFileLocator... classFileLocator)
Creates a new compound class file locator.
|
Modifier and Type | Method and Description |
---|---|
static <U> TypeWriter<U> |
TypeWriter.Default.forRebasing(MethodRegistry.Compiled methodRegistry,
TypeWriter.FieldPool fieldPool,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
Implementation.Context.Factory implementationContextFactory,
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,
Implementation.Context.Factory implementationContextFactory,
ClassVisitorWrapper classVisitorWrapper,
TypeAttributeAppender attributeAppender,
ClassFileVersion classFileVersion,
ClassFileLocator classFileLocator,
TypeDescription targetType)
Creates a type writer for creating a new type.
|
protected static ClassWriter |
TypeWriter.Default.FrameComputingClassWriter.of(ClassReader classReader,
int flags,
ClassFileLocator classFileLocator) |
Constructor and Description |
---|
ForInlining(TypeDescription instrumentedType,
LoadedTypeInitializer loadedTypeInitializer,
InstrumentedType.TypeInitializer typeInitializer,
List<DynamicType> explicitAuxiliaryTypes,
ClassFileVersion classFileVersion,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
Implementation.Context.Factory implementationContextFactory,
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.
|
Constructor and Description |
---|
RebaseDynamicTypeBuilder(ClassFileVersion classFileVersion,
NamingStrategy namingStrategy,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
Implementation.Context.Factory implementationContextFactory,
InstrumentedType.TypeInitializer typeInitializer,
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,
InstrumentedType.TypeInitializer typeInitializer,
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 |
---|---|
static TypePool |
TypePool.Default.of(ClassFileLocator classFileLocator)
Creates a default
TypePool that looks up data by querying the supplied class
file locator. |
Constructor and Description |
---|
Default(TypePool.CacheProvider cacheProvider,
ClassFileLocator classFileLocator,
TypePool.Default.ReaderMode readerMode)
Creates a new default type pool.
|
Copyright © 2014–2015. All rights reserved.