| 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.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.instrumentation |
The instrumentation package contains any logic for intercepting method calls.
|
| net.bytebuddy.instrumentation.type |
This package contains types and implementations for describing a Java type, i.e.
|
| Modifier and Type | Method and Description |
|---|---|
void |
AgentBuilder.Default.InitializationStrategy.initialize(Class<?> type,
LoadedTypeInitializer loadedTypeInitializer)
Determines if and how a loaded type initializer is to be applied to a loaded type.
|
void |
AgentBuilder.Default.InitializationStrategy.SelfInjection.initialize(Class<?> type,
LoadedTypeInitializer loadedTypeInitializer) |
void |
AgentBuilder.Default.InitializationStrategy.NoOp.initialize(Class<?> type,
LoadedTypeInitializer loadedTypeInitializer) |
void |
AgentBuilder.Default.InitializationStrategy.register(String name,
ClassLoader classLoader,
LoadedTypeInitializer loadedTypeInitializer)
Registers a loaded type initializer for a type name and class loader pair.
|
void |
AgentBuilder.Default.InitializationStrategy.SelfInjection.register(String name,
ClassLoader classLoader,
LoadedTypeInitializer loadedTypeInitializer) |
void |
AgentBuilder.Default.InitializationStrategy.NoOp.register(String name,
ClassLoader classLoader,
LoadedTypeInitializer loadedTypeInitializer) |
| 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[] typeByte,
LoadedTypeInitializer loadedTypeInitializer,
List<? extends DynamicType> auxiliaryTypes)
Creates a new unloaded representation of a dynamic type.
|
| Modifier and Type | Method and Description |
|---|---|
LoadedTypeInitializer |
MethodRegistry.Prepared.getLoadedTypeInitializer()
The type initializer as it is required by this instance's
Instrumentations. |
LoadedTypeInitializer |
MethodRegistry.Compiled.getLoadedTypeInitializer()
The loaded type initializer as it is required by this instance's
Instrumentations. |
LoadedTypeInitializer |
MethodRegistry.Default.Prepared.getLoadedTypeInitializer() |
LoadedTypeInitializer |
MethodRegistry.Default.Compiled.getLoadedTypeInitializer() |
| Constructor and Description |
|---|
Compiled(TypeDescription instrumentedType,
LoadedTypeInitializer loadedTypeInitializer,
InstrumentedType.TypeInitializer typeInitializer,
MethodList invokableMethods,
List<MethodRegistry.Default.Compiled.Entry> entries,
TypeWriter.MethodPool.Entry fallback)
Creates a new compiled default method registry.
|
Default(TypeDescription instrumentedType,
LoadedTypeInitializer loadedTypeInitializer,
InstrumentedType.TypeInitializer typeInitializer,
List<DynamicType> explicitAuxiliaryTypes,
ClassFileVersion classFileVersion,
TypeWriter.Engine engine)
Creates a new immutable type writer.
|
Prepared(TypeDescription instrumentedType,
LoadedTypeInitializer loadedTypeInitializer,
InstrumentedType.TypeInitializer typeInitializer,
List<MethodRegistry.Default.Entry> entries,
List<MethodRegistry.Default.Entry> additionalEntries)
Creates a new prepared default method registry.
|
| Modifier and Type | Method and Description |
|---|---|
InstrumentedType |
InlineInstrumentedType.withInitializer(LoadedTypeInitializer loadedTypeInitializer) |
| Constructor and Description |
|---|
InlineInstrumentedType(TypeDescription levelType,
String name,
List<TypeDescription> interfaces,
int modifiers,
List<? extends FieldDescription> fieldDescriptions,
List<? extends MethodDescription> methodDescriptions,
LoadedTypeInitializer loadedTypeInitializer,
InstrumentedType.TypeInitializer typeInitializer)
Creates a new inlined instrumented type.
|
| Modifier and Type | Method and Description |
|---|---|
InstrumentedType |
SubclassInstrumentedType.withInitializer(LoadedTypeInitializer loadedTypeInitializer) |
| Constructor and Description |
|---|
SubclassInstrumentedType(ClassFileVersion classFileVersion,
TypeDescription superClass,
List<TypeDescription> interfaces,
int modifiers,
String name,
List<? extends FieldDescription> fieldDescriptions,
List<? extends MethodDescription> methodDescriptions,
LoadedTypeInitializer loadedTypeInitializer,
InstrumentedType.TypeInitializer typeInitializer)
Creates a new immutable type instrumentation for a loaded superclass.
|
| Modifier and Type | Class and Description |
|---|---|
static class |
LoadedTypeInitializer.Compound
A compound loaded type initializer that combines several type initializers.
|
static class |
LoadedTypeInitializer.ForStaticField<T>
A type initializer for setting a value for a static field.
|
static class |
LoadedTypeInitializer.NoOp
A loaded type initializer that does not do anything.
|
| Modifier and Type | Method and Description |
|---|---|
static LoadedTypeInitializer |
LoadedTypeInitializer.ForStaticField.accessible(String fieldName,
Object value)
Creates a
LoadedTypeInitializer for given field name and value where the
field is accessible by reflection. |
static LoadedTypeInitializer |
LoadedTypeInitializer.ForStaticField.nonAccessible(String fieldName,
Object value)
Creates a
LoadedTypeInitializer for given field name and value where the
field is not accessible by reflection and needs to be prepared accordingly. |
| 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.
|
| Modifier and Type | Field and Description |
|---|---|
protected LoadedTypeInitializer |
InstrumentedType.AbstractBase.loadedTypeInitializer
The loaded type initializer for this instrumented type.
|
| Modifier and Type | Method and Description |
|---|---|
LoadedTypeInitializer |
InstrumentedType.getLoadedTypeInitializer()
Returns the
LoadedTypeInitializers that were registered
for this instrumented type. |
LoadedTypeInitializer |
InstrumentedType.AbstractBase.getLoadedTypeInitializer() |
| Modifier and Type | Method and Description |
|---|---|
InstrumentedType |
InstrumentedType.withInitializer(LoadedTypeInitializer loadedTypeInitializer)
Creates a new instrumented type that includes the given
LoadedTypeInitializer. |
| Constructor and Description |
|---|
AbstractBase(LoadedTypeInitializer loadedTypeInitializer,
InstrumentedType.TypeInitializer typeInitializer,
String typeName,
List<? extends FieldDescription> fieldDescriptions,
List<? extends MethodDescription> methodDescriptions)
Creates a new instrumented type with the given loaded type initializer and field and methods.
|
Copyright © 2014. All rights reserved.