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.
|
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() |
Modifier and Type | Method and Description |
---|---|
DynamicType.Builder<T> |
DynamicType.Builder.initializer(LoadedTypeInitializer loadedTypeInitializer)
Executes the supplied loaded type initializer when loading the created instrumented type.
|
DynamicType.Builder<U> |
DynamicType.Builder.AbstractBase.Delegator.initializer(LoadedTypeInitializer loadedTypeInitializer) |
DynamicType.Builder<U> |
DynamicType.Builder.AbstractBase.Adapter.initializer(LoadedTypeInitializer loadedTypeInitializer) |
void |
NexusAccessor.register(String name,
ClassLoader classLoader,
int identification,
LoadedTypeInitializer loadedTypeInitializer)
Registers a loaded type initializer in Byte Buddy's
Nexus which is injected into the system class loader. |
void |
NexusAccessor.Dispatcher.register(String name,
ClassLoader classLoader,
ReferenceQueue<? super ClassLoader> referenceQueue,
int identification,
LoadedTypeInitializer loadedTypeInitializer)
Registers a type initializer with the system class loader's nexus.
|
void |
NexusAccessor.Dispatcher.Available.register(String name,
ClassLoader classLoader,
ReferenceQueue<? super ClassLoader> referenceQueue,
int identification,
LoadedTypeInitializer loadedTypeInitializer) |
void |
NexusAccessor.Dispatcher.Unavailable.register(String name,
ClassLoader classLoader,
ReferenceQueue<? super ClassLoader> referenceQueue,
int identification,
LoadedTypeInitializer loadedTypeInitializer) |
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,
TypeResolutionStrategy.Resolved typeResolutionStrategy)
Creates a new unloaded representation of a dynamic type.
|
Modifier and Type | Field and Description |
---|---|
protected LoadedTypeInitializer |
TypeWriter.Default.loadedTypeInitializer
The loaded type initializer to apply onto the created type after loading.
|
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
LoadedTypeInitializer s that were registered
for this instrumented type. |
LoadedTypeInitializer |
InstrumentedType.Default.getLoadedTypeInitializer() |
LoadedTypeInitializer |
InstrumentedType.Frozen.getLoadedTypeInitializer() |
Modifier and Type | Method and Description |
---|---|
InstrumentedType |
InstrumentedType.withInitializer(LoadedTypeInitializer loadedTypeInitializer)
Creates a new instrumented type that includes the given
LoadedTypeInitializer . |
InstrumentedType.WithFlexibleName |
InstrumentedType.WithFlexibleName.withInitializer(LoadedTypeInitializer loadedTypeInitializer) |
InstrumentedType.WithFlexibleName |
InstrumentedType.Default.withInitializer(LoadedTypeInitializer loadedTypeInitializer) |
InstrumentedType.WithFlexibleName |
InstrumentedType.Frozen.withInitializer(LoadedTypeInitializer loadedTypeInitializer) |
Constructor and Description |
---|
Compiled(TypeDescription instrumentedType,
LoadedTypeInitializer loadedTypeInitializer,
TypeInitializer typeInitializer,
MethodList<?> methods,
LinkedHashMap<MethodDescription,MethodRegistry.Default.Compiled.Entry> implementations,
boolean supportsBridges)
Creates a new compiled version of a default method registry.
|
Default(String name,
int modifiers,
TypeDescription.Generic superClass,
List<? extends TypeVariableToken> typeVariables,
List<? extends TypeDescription.Generic> interfaceTypes,
List<? extends FieldDescription.Token> fieldTokens,
List<? extends MethodDescription.Token> methodTokens,
List<? extends AnnotationDescription> annotationDescriptions,
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,
ClassFileVersion classFileVersion,
TypeWriter.FieldPool fieldPool,
List<? extends DynamicType> auxiliaryTypes,
FieldList<FieldDescription.InDefinedShape> fields,
MethodList<?> methods,
MethodList<?> instrumentedMethods,
LoadedTypeInitializer loadedTypeInitializer,
TypeInitializer typeInitializer,
TypeAttributeAppender typeAttributeAppender,
AsmVisitorWrapper asmVisitorWrapper,
AnnotationValueFilter.Factory annotationValueFilterFactory,
AnnotationRetention annotationRetention,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
Implementation.Context.Factory implementationContextFactory,
TypeValidation typeValidation,
ClassWriterStrategy classWriterStrategy,
TypePool typePool)
Creates a new default type writer.
|
ForCreation(TypeDescription instrumentedType,
ClassFileVersion classFileVersion,
TypeWriter.FieldPool fieldPool,
TypeWriter.MethodPool methodPool,
List<? extends DynamicType> auxiliaryTypes,
FieldList<FieldDescription.InDefinedShape> fields,
MethodList<?> methods,
MethodList<?> instrumentedMethods,
LoadedTypeInitializer loadedTypeInitializer,
TypeInitializer typeInitializer,
TypeAttributeAppender typeAttributeAppender,
AsmVisitorWrapper asmVisitorWrapper,
AnnotationValueFilter.Factory annotationValueFilterFactory,
AnnotationRetention annotationRetention,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
Implementation.Context.Factory implementationContextFactory,
TypeValidation typeValidation,
ClassWriterStrategy classWriterStrategy,
TypePool typePool)
Creates a new default type writer for creating a new type that is not based on an existing class file.
|
ForInlining(TypeDescription instrumentedType,
ClassFileVersion classFileVersion,
TypeWriter.FieldPool fieldPool,
MethodRegistry.Prepared methodRegistry,
Implementation.Target.Factory implementationTargetFactory,
List<DynamicType> explicitAuxiliaryTypes,
FieldList<FieldDescription.InDefinedShape> fields,
MethodList<?> methods,
MethodList<?> instrumentedMethods,
LoadedTypeInitializer loadedTypeInitializer,
TypeInitializer typeInitializer,
TypeAttributeAppender typeAttributeAppender,
AsmVisitorWrapper asmVisitorWrapper,
AnnotationValueFilter.Factory annotationValueFilterFactory,
AnnotationRetention annotationRetention,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
Implementation.Context.Factory implementationContextFactory,
TypeValidation typeValidation,
ClassWriterStrategy classWriterStrategy,
TypePool typePool,
TypeDescription originalType,
ClassFileLocator classFileLocator,
MethodRebaseResolver methodRebaseResolver)
Creates a new default type writer for creating a new type that is not based on an existing class file.
|
Frozen(TypeDescription typeDescription,
LoadedTypeInitializer loadedTypeInitializer)
Creates a new frozen representation of an instrumented type.
|
Prepared(LinkedHashMap<MethodDescription,MethodRegistry.Default.Prepared.Entry> implementations,
LoadedTypeInitializer loadedTypeInitializer,
TypeInitializer typeInitializer,
TypeDescription instrumentedType,
MethodGraph.Linked methodGraph,
MethodList<?> methods)
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–2018. All rights reserved.