Package | Description |
---|---|
net.bytebuddy.asm |
The ASM package contains classes that are meant for direct interaction with the ASM API.
|
net.bytebuddy.build |
A package for types that allow for applying Byte Buddy transformation during a build process.
|
net.bytebuddy.description.method |
Contains descriptions of Java methods and constructors as well as their parameters.
|
net.bytebuddy.description.type |
Contains descriptions of Java types and packages.
|
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.
|
net.bytebuddy.matcher |
Contains an API for matching Java byte code entities.
|
net.bytebuddy.pool |
Classes of this package allow for the creating
TypeDescription s without
loading any classes. |
Modifier and Type | Method and Description |
---|---|
ClassVisitor |
TypeReferenceAdjustment.wrap(TypeDescription instrumentedType,
ClassVisitor classVisitor,
Implementation.Context implementationContext,
TypePool typePool,
FieldList<FieldDescription.InDefinedShape> fields,
MethodList<?> methods,
int writerFlags,
int readerFlags)
Applies a
ClassVisitorWrapper to the creation of a DynamicType . |
ClassVisitor |
TypeConstantAdjustment.wrap(TypeDescription instrumentedType,
ClassVisitor classVisitor,
Implementation.Context implementationContext,
TypePool typePool,
FieldList<FieldDescription.InDefinedShape> fields,
MethodList<?> methods,
int writerFlags,
int readerFlags)
Applies a
ClassVisitorWrapper to the creation of a DynamicType . |
ModifierAdjustment.ModifierAdjustingClassVisitor |
ModifierAdjustment.wrap(TypeDescription instrumentedType,
ClassVisitor classVisitor,
Implementation.Context implementationContext,
TypePool typePool,
FieldList<FieldDescription.InDefinedShape> fields,
MethodList<?> methods,
int writerFlags,
int readerFlags)
Applies a
ClassVisitorWrapper to the creation of a DynamicType . |
ClassVisitor |
MemberRemoval.wrap(TypeDescription instrumentedType,
ClassVisitor classVisitor,
Implementation.Context implementationContext,
TypePool typePool,
FieldList<FieldDescription.InDefinedShape> fields,
MethodList<?> methods,
int writerFlags,
int readerFlags)
Applies a
ClassVisitorWrapper to the creation of a DynamicType . |
ClassVisitor |
AsmVisitorWrapper.wrap(TypeDescription instrumentedType,
ClassVisitor classVisitor,
Implementation.Context implementationContext,
TypePool typePool,
FieldList<FieldDescription.InDefinedShape> fields,
MethodList<?> methods,
int writerFlags,
int readerFlags)
Applies a
ClassVisitorWrapper to the creation of a DynamicType . |
ClassVisitor |
AsmVisitorWrapper.NoOp.wrap(TypeDescription instrumentedType,
ClassVisitor classVisitor,
Implementation.Context implementationContext,
TypePool typePool,
FieldList<FieldDescription.InDefinedShape> fields,
MethodList<?> methods,
int writerFlags,
int readerFlags)
Applies a
ClassVisitorWrapper to the creation of a DynamicType . |
ClassVisitor |
AsmVisitorWrapper.ForDeclaredFields.wrap(TypeDescription instrumentedType,
ClassVisitor classVisitor,
Implementation.Context implementationContext,
TypePool typePool,
FieldList<FieldDescription.InDefinedShape> fields,
MethodList<?> methods,
int writerFlags,
int readerFlags)
Applies a
ClassVisitorWrapper to the creation of a DynamicType . |
ClassVisitor |
AsmVisitorWrapper.ForDeclaredMethods.wrap(TypeDescription instrumentedType,
ClassVisitor classVisitor,
Implementation.Context implementationContext,
TypePool typePool,
FieldList<FieldDescription.InDefinedShape> fields,
MethodList<?> methods,
int writerFlags,
int readerFlags)
Applies a
ClassVisitorWrapper to the creation of a DynamicType . |
ClassVisitor |
AsmVisitorWrapper.Compound.wrap(TypeDescription instrumentedType,
ClassVisitor classVisitor,
Implementation.Context implementationContext,
TypePool typePool,
FieldList<FieldDescription.InDefinedShape> fields,
MethodList<?> methods,
int writerFlags,
int readerFlags)
Applies a
ClassVisitorWrapper to the creation of a DynamicType . |
Modifier and Type | Method and Description |
---|---|
ClassVisitor |
RenamingPlugin.wrap(TypeDescription instrumentedType,
ClassVisitor classVisitor,
Implementation.Context implementationContext,
TypePool typePool,
FieldList<FieldDescription.InDefinedShape> fields,
MethodList<?> methods,
int writerFlags,
int readerFlags)
Applies a
ClassVisitorWrapper to the creation of a DynamicType . |
Modifier and Type | Class and Description |
---|---|
static class |
MethodList.AbstractBase<S extends MethodDescription>
A base implementation of a
MethodList . |
static class |
MethodList.Empty<S extends MethodDescription>
An implementation of an empty method list.
|
static class |
MethodList.Explicit<S extends MethodDescription>
A method list that is a wrapper for a given list of method descriptions.
|
static class |
MethodList.ForLoadedMethods
A method list implementation that returns all loaded byte code methods (methods and constructors) that
are declared for a given type.
|
static class |
MethodList.ForTokens
A list of method descriptions for a list of detached tokens.
|
static class |
MethodList.TypeSubstituting
A list of method descriptions that yields
MethodDescription.TypeSubstituting . |
Modifier and Type | Method and Description |
---|---|
MethodList<MethodDescription.InDefinedShape> |
MethodList.asDefined()
Returns this list of these method descriptions resolved to their defined shape.
|
MethodList<MethodDescription.InDefinedShape> |
MethodList.AbstractBase.asDefined()
Returns this list of these method descriptions resolved to their defined shape.
|
MethodList<MethodDescription.InDefinedShape> |
MethodList.Empty.asDefined()
Returns this list of these method descriptions resolved to their defined shape.
|
protected MethodList<S> |
MethodList.AbstractBase.wrap(List<S> values) |
Modifier and Type | Method and Description |
---|---|
MethodList<MethodDescription.InDefinedShape> |
TypeDescription.getDeclaredMethods()
Returns the methods that this type declares.
|
MethodList<MethodDescription.InGenericShape> |
TypeDescription.Generic.getDeclaredMethods()
Returns the methods that this type declares.
|
MethodList<MethodDescription.InGenericShape> |
TypeDescription.Generic.OfNonGenericType.getDeclaredMethods()
Returns the methods that this type declares.
|
MethodList<MethodDescription.InGenericShape> |
TypeDescription.Generic.OfNonGenericType.ForReifiedErasure.getDeclaredMethods()
Returns the methods that this type declares.
|
MethodList<MethodDescription.InGenericShape> |
TypeDescription.Generic.OfGenericArray.getDeclaredMethods()
Returns the methods that this type declares.
|
MethodList<MethodDescription.InGenericShape> |
TypeDescription.Generic.OfWildcardType.getDeclaredMethods()
Returns the methods that this type declares.
|
MethodList<MethodDescription.InGenericShape> |
TypeDescription.Generic.OfParameterizedType.getDeclaredMethods()
Returns the methods that this type declares.
|
MethodList<MethodDescription.InGenericShape> |
TypeDescription.Generic.OfParameterizedType.ForReifiedType.getDeclaredMethods()
Returns the methods that this type declares.
|
MethodList<MethodDescription.InGenericShape> |
TypeDescription.Generic.OfTypeVariable.getDeclaredMethods()
Returns the methods that this type declares.
|
MethodList<MethodDescription.InGenericShape> |
TypeDescription.Generic.OfTypeVariable.Symbolic.getDeclaredMethods()
Returns the methods that this type declares.
|
MethodList<MethodDescription.InGenericShape> |
TypeDescription.Generic.LazyProjection.getDeclaredMethods()
Returns the methods that this type declares.
|
MethodList<MethodDescription.InDefinedShape> |
TypeDescription.AbstractBase.OfSimpleType.WithDelegation.getDeclaredMethods()
Returns the methods that this type declares.
|
MethodList<MethodDescription.InDefinedShape> |
TypeDescription.ForLoadedType.getDeclaredMethods()
Returns the methods that this type declares.
|
MethodList<MethodDescription.InDefinedShape> |
TypeDescription.ArrayProjection.getDeclaredMethods()
Returns the methods that this type declares.
|
MethodList<MethodDescription.InDefinedShape> |
TypeDescription.Latent.getDeclaredMethods()
Returns the methods that this type declares.
|
MethodList<MethodDescription.InDefinedShape> |
TypeDescription.ForPackageDescription.getDeclaredMethods()
Returns the methods that this type declares.
|
MethodList<MethodDescription.InDefinedShape> |
TypeDescription.SuperTypeLoading.getDeclaredMethods()
Returns the methods that this type declares.
|
MethodList<?> |
TypeDefinition.getDeclaredMethods()
Returns the methods that this type declares.
|
Modifier and Type | Field and Description |
---|---|
protected MethodList<?> |
TypeWriter.Default.instrumentedMethods
The instrumented methods relevant to this type creation.
|
protected MethodList<?> |
TypeWriter.Default.methods
The instrumented type's methods that are declared or inherited.
|
Modifier and Type | Method and Description |
---|---|
MethodList<?> |
MethodGraph.NodeList.asMethodList()
Transforms this list of nodes into a list of the node's representatives.
|
MethodList<MethodDescription.InDefinedShape> |
InstrumentedType.Default.getDeclaredMethods()
Returns the methods that this type declares.
|
MethodList<MethodDescription.InDefinedShape> |
InstrumentedType.Frozen.getDeclaredMethods()
Returns the methods that this type declares.
|
MethodList<?> |
MethodRegistry.Prepared.getInstrumentedMethods()
Returns a list of all methods that should be instrumented.
|
MethodList<?> |
MethodRegistry.Compiled.getInstrumentedMethods()
Returns a list of all methods that should be instrumented.
|
MethodList<?> |
MethodRegistry.Default.Prepared.getInstrumentedMethods()
Returns a list of all methods that should be instrumented.
|
MethodList<?> |
MethodRegistry.Default.Compiled.getInstrumentedMethods()
Returns a list of all methods that should be instrumented.
|
MethodList<?> |
MethodRegistry.Prepared.getMethods()
Returns the declared or virtually inherited methods of this type.
|
MethodList<?> |
MethodRegistry.Compiled.getMethods()
Returns the declared or virtually inherited methods of this type.
|
MethodList<?> |
MethodRegistry.Default.Prepared.getMethods()
Returns the declared or virtually inherited methods of this type.
|
MethodList<?> |
MethodRegistry.Default.Compiled.getMethods()
Returns the declared or virtually inherited methods of this type.
|
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(TypeDescription instrumentedType,
ClassFileVersion classFileVersion,
TypeWriter.FieldPool fieldPool,
TypeWriter.RecordComponentPool recordComponentPool,
List<? extends DynamicType> auxiliaryTypes,
FieldList<FieldDescription.InDefinedShape> fields,
MethodList<?> methods,
MethodList<?> instrumentedMethods,
RecordComponentList<RecordComponentDescription.InDefinedShape> recordComponents,
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.
|
Default(TypeDescription instrumentedType,
ClassFileVersion classFileVersion,
TypeWriter.FieldPool fieldPool,
TypeWriter.RecordComponentPool recordComponentPool,
List<? extends DynamicType> auxiliaryTypes,
FieldList<FieldDescription.InDefinedShape> fields,
MethodList<?> methods,
MethodList<?> instrumentedMethods,
RecordComponentList<RecordComponentDescription.InDefinedShape> recordComponents,
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,
TypeWriter.RecordComponentPool recordComponentPool,
List<? extends DynamicType> auxiliaryTypes,
FieldList<FieldDescription.InDefinedShape> fields,
MethodList<?> methods,
MethodList<?> instrumentedMethods,
RecordComponentList<RecordComponentDescription.InDefinedShape> recordComponents,
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.
|
ForCreation(TypeDescription instrumentedType,
ClassFileVersion classFileVersion,
TypeWriter.FieldPool fieldPool,
TypeWriter.MethodPool methodPool,
TypeWriter.RecordComponentPool recordComponentPool,
List<? extends DynamicType> auxiliaryTypes,
FieldList<FieldDescription.InDefinedShape> fields,
MethodList<?> methods,
MethodList<?> instrumentedMethods,
RecordComponentList<RecordComponentDescription.InDefinedShape> recordComponents,
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,
TypeWriter.RecordComponentPool recordComponentPool,
List<? extends DynamicType> auxiliaryTypes,
FieldList<FieldDescription.InDefinedShape> fields,
MethodList<?> methods,
MethodList<?> instrumentedMethods,
RecordComponentList<RecordComponentDescription.InDefinedShape> recordComponents,
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)
Creates a new inlining type writer.
|
ForInlining(TypeDescription instrumentedType,
ClassFileVersion classFileVersion,
TypeWriter.FieldPool fieldPool,
TypeWriter.RecordComponentPool recordComponentPool,
List<? extends DynamicType> auxiliaryTypes,
FieldList<FieldDescription.InDefinedShape> fields,
MethodList<?> methods,
MethodList<?> instrumentedMethods,
RecordComponentList<RecordComponentDescription.InDefinedShape> recordComponents,
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)
Creates a new inlining type writer.
|
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.
|
WithDecorationOnly(TypeDescription instrumentedType,
ClassFileVersion classFileVersion,
List<? extends DynamicType> auxiliaryTypes,
MethodList<?> methods,
TypeAttributeAppender typeAttributeAppender,
AsmVisitorWrapper asmVisitorWrapper,
AnnotationValueFilter.Factory annotationValueFilterFactory,
AnnotationRetention annotationRetention,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
Implementation.Context.Factory implementationContextFactory,
TypeValidation typeValidation,
ClassWriterStrategy classWriterStrategy,
TypePool typePool,
ClassFileLocator classFileLocator)
Creates a new inlining type writer that only applies a decoration.
|
WithFullProcessing(TypeDescription instrumentedType,
ClassFileVersion classFileVersion,
TypeWriter.FieldPool fieldPool,
TypeWriter.RecordComponentPool recordComponentPool,
List<? extends DynamicType> auxiliaryTypes,
FieldList<FieldDescription.InDefinedShape> fields,
MethodList<?> methods,
MethodList<?> instrumentedMethods,
RecordComponentList<RecordComponentDescription.InDefinedShape> recordComponents,
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,
MethodRegistry.Prepared methodRegistry,
Implementation.Target.Factory implementationTargetFactory,
MethodRebaseResolver methodRebaseResolver)
Creates a new inlining type writer that fully reprocesses a type.
|
WithFullProcessing(TypeDescription instrumentedType,
ClassFileVersion classFileVersion,
TypeWriter.FieldPool fieldPool,
TypeWriter.RecordComponentPool recordComponentPool,
List<? extends DynamicType> auxiliaryTypes,
FieldList<FieldDescription.InDefinedShape> fields,
MethodList<?> methods,
MethodList<?> instrumentedMethods,
RecordComponentList<RecordComponentDescription.InDefinedShape> recordComponents,
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,
MethodRegistry.Prepared methodRegistry,
Implementation.Target.Factory implementationTargetFactory,
MethodRebaseResolver methodRebaseResolver)
Creates a new inlining type writer that fully reprocesses a type.
|
Modifier and Type | Method and Description |
---|---|
protected static MethodDelegation.ImplementationDelegate |
MethodDelegation.ImplementationDelegate.ForStaticMethod.of(MethodList<?> methods,
MethodDelegationBinder methodDelegationBinder)
Precompiles a static method delegation for a given list of methods.
|
protected static MethodDelegation.ImplementationDelegate |
MethodDelegation.ImplementationDelegate.ForConstruction.of(TypeDescription typeDescription,
MethodList<?> methods,
MethodDelegationBinder methodDelegationBinder)
Creates an implementation delegate for constructing a new instance.
|
Constructor and Description |
---|
DeclaringMethodMatcher(ElementMatcher<? super MethodList<? extends MethodDescription>> matcher)
Creates a new matcher for a type's declared methods.
|
Modifier and Type | Class and Description |
---|---|
protected class |
TypePool.Default.LazyTypeDescription.MethodTokenList
A list of method tokens representing each entry as a method description.
|
Modifier and Type | Method and Description |
---|---|
MethodList<MethodDescription.InDefinedShape> |
TypePool.Default.LazyTypeDescription.getDeclaredMethods()
Returns the methods that this type declares.
|
Copyright © 2014–2023. All rights reserved.