| Package | Description |
|---|---|
| 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.implementation |
The implementation package contains any logic for intercepting method calls.
|
| Modifier and Type | Class and Description |
|---|---|
protected static class |
AgentBuilder.InitializationStrategy.SelfInjection.Dispatcher.InjectingInitializer
A type initializer that injects all auxiliary types of the instrumented type.
|
| Modifier and Type | Method and Description |
|---|---|
void |
AgentBuilder.InitializationStrategy.SelfInjection.NexusAccessor.register(String name,
ClassLoader classLoader,
int identification,
LoadedTypeInitializer typeInitializer)
Registers a type initializer with the class loader's nexus.
|
void |
AgentBuilder.InitializationStrategy.SelfInjection.NexusAccessor.Dispatcher.register(String name,
ClassLoader classLoader,
int identification,
LoadedTypeInitializer typeInitializer)
Registers a type initializer with the class loader's nexus.
|
void |
AgentBuilder.InitializationStrategy.SelfInjection.NexusAccessor.Dispatcher.Available.register(String name,
ClassLoader classLoader,
int identification,
LoadedTypeInitializer typeInitializer) |
void |
AgentBuilder.InitializationStrategy.SelfInjection.NexusAccessor.Dispatcher.Unavailable.register(String name,
ClassLoader classLoader,
int identification,
LoadedTypeInitializer typeInitializer) |
| Constructor and Description |
|---|
InjectingInitializer(TypeDescription instrumentedType,
Map<TypeDescription,byte[]> rawAuxiliaryTypes,
Map<TypeDescription,LoadedTypeInitializer> loadedTypeInitializers,
ClassInjector classInjector)
Creates a new injection initializer.
|
| Modifier and Type | Field and Description |
|---|---|
protected LoadedTypeInitializer |
DynamicType.Default.loadedTypeInitializer
The loaded type initializer for this dynamic type.
|
| Modifier and Type | Method and Description |
|---|---|
Map<TypeDescription,LoadedTypeInitializer> |
DynamicType.getLoadedTypeInitializers()
Returns a map of all loaded type initializers for the main type and all auxiliary types, if any.
|
Map<TypeDescription,LoadedTypeInitializer> |
DynamicType.Default.getLoadedTypeInitializers() |
| Constructor and Description |
|---|
Default(TypeDescription typeDescription,
byte[] binaryRepresentation,
LoadedTypeInitializer loadedTypeInitializer,
List<? extends DynamicType> auxiliaryTypes)
Creates a new dynamic type.
|
Loaded(TypeDescription typeDescription,
byte[] typeByte,
LoadedTypeInitializer loadedTypeInitializer,
List<? extends DynamicType> auxiliaryTypes,
Map<TypeDescription,Class<?>> loadedTypes)
Creates a new representation of a loaded dynamic type.
|
Unloaded(TypeDescription typeDescription,
byte[] binaryRepresentation,
LoadedTypeInitializer loadedTypeInitializer,
List<? extends DynamicType> auxiliaryTypes)
Creates a new unloaded representation of a dynamic type.
|
| Modifier and Type | Field and Description |
|---|---|
protected LoadedTypeInitializer |
TypeWriter.Default.loadedTypeInitializer
The loaded type initializer of the instrumented type.
|
| Modifier and Type | Method and Description |
|---|---|
LoadedTypeInitializer |
MethodRegistry.Prepared.getLoadedTypeInitializer()
Returns the loaded type initializer of the instrumented type.
|
LoadedTypeInitializer |
MethodRegistry.Compiled.getLoadedTypeInitializer()
Returns the loaded type initializer of the instrumented type.
|
LoadedTypeInitializer |
MethodRegistry.Default.Prepared.getLoadedTypeInitializer() |
LoadedTypeInitializer |
MethodRegistry.Default.Compiled.getLoadedTypeInitializer() |
LoadedTypeInitializer |
InstrumentedType.getLoadedTypeInitializer()
Returns the
LoadedTypeInitializers that were registered
for this instrumented type. |
LoadedTypeInitializer |
InstrumentedType.Default.getLoadedTypeInitializer() |
| Modifier and Type | Method and Description |
|---|---|
InstrumentedType |
InstrumentedType.withInitializer(LoadedTypeInitializer loadedTypeInitializer)
Creates a new instrumented type that includes the given
LoadedTypeInitializer. |
InstrumentedType |
InstrumentedType.Default.withInitializer(LoadedTypeInitializer loadedTypeInitializer) |
| Constructor and Description |
|---|
Compiled(TypeDescription instrumentedType,
LoadedTypeInitializer loadedTypeInitializer,
InstrumentedType.TypeInitializer typeInitializer,
LinkedHashMap<MethodDescription,MethodRegistry.Default.Compiled.Entry> implementations)
Creates a new compiled version of a default method registry.
|
Default(String name,
int modifiers,
List<? extends GenericTypeDescription> typeVariables,
GenericTypeDescription superType,
List<? extends GenericTypeDescription> interfaceTypes,
List<? extends FieldDescription.Token> fieldTokens,
List<? extends MethodDescription.Token> methodTokens,
List<? extends AnnotationDescription> annotationDescriptions,
InstrumentedType.TypeInitializer typeInitializer,
LoadedTypeInitializer loadedTypeInitializer)
Creates a new instrumented type with default values for any properties that only exist for types that are declared within another type.
|
Default(String name,
int modifiers,
List<? extends GenericTypeDescription> typeVariables,
GenericTypeDescription superType,
List<? extends GenericTypeDescription> interfaceTypes,
List<? extends FieldDescription.Token> fieldTokens,
List<? extends MethodDescription.Token> methodTokens,
List<? extends AnnotationDescription> annotationDescriptions,
InstrumentedType.TypeInitializer typeInitializer,
LoadedTypeInitializer loadedTypeInitializer,
TypeDescription declaringType,
MethodDescription enclosingMethod,
TypeDescription enclosingType,
List<? extends TypeDescription> declaredTypes,
boolean memberClass,
boolean anonymousClass,
boolean localClass)
Creates a new instrumented type.
|
Default(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)
Creates a new default type writer.
|
ForCreation(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)
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,
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.
|
Prepared(LinkedHashMap<MethodDescription,MethodRegistry.Default.Prepared.Entry> implementations,
LoadedTypeInitializer loadedTypeInitializer,
InstrumentedType.TypeInitializer typeInitializer,
TypeDescription instrumentedType,
MethodGraph.Linked methodGraph)
Creates a prepared version of a default method registry.
|
| Modifier and Type | Class and Description |
|---|---|
static class |
LoadedTypeInitializer.Compound
A compound loaded type initializer that combines several type initializers.
|
static class |
LoadedTypeInitializer.ForStaticField
A type initializer for setting a value for a static field.
|
static class |
LoadedTypeInitializer.NoOp
A loaded type initializer that does not do anything.
|
| Constructor and Description |
|---|
Compound(LoadedTypeInitializer... loadedTypeInitializer)
Creates a new compound loaded type initializer.
|
| Constructor and Description |
|---|
Compound(List<? extends LoadedTypeInitializer> loadedTypeInitializers)
Creates a new compound loaded type initializer.
|
Copyright © 2014–2015. All rights reserved.