Top Description Fields Constructors Methods
net.bytebuddy.dynamic.scaffold.inline

public Class RedefinitionDynamicTypeBuilder<T>

extends AbstractInliningDynamicTypeBuilder<T>
Class Inheritance
Type Parameters
<T>
A loaded type that the dynamic type is guaranteed to be a subtype of.
Imports
net.bytebuddy.ClassFileVersion, net.bytebuddy.asm.AsmVisitorWrapper, net.bytebuddy.description.method.MethodDescription, net.bytebuddy.description.type.TypeDescription, net.bytebuddy.dynamic.ClassFileLocator, .DynamicType, .VisibilityBridgeStrategy, net.bytebuddy.dynamic.scaffold.*, net.bytebuddy.implementation.Implementation, net.bytebuddy.implementation.attribute.AnnotationRetention, .AnnotationValueFilter, .TypeAttributeAppender, net.bytebuddy.implementation.auxiliary.AuxiliaryType, net.bytebuddy.matcher.LatentMatcher, net.bytebuddy.pool.TypePool, java.util.Collections, .List

A type builder that redefines an instrumented type.

Field Summary

Inherited from net.bytebuddy.dynamic.scaffold.inline.AbstractInliningDynamicTypeBuilder:
classFileLocatororiginalType

Constructor Summary

AccessConstructor and Description
public
RedefinitionDynamicTypeBuilder(InstrumentedType.WithFlexibleName
An instrumented type representing the subclass.
instrumentedType
,
ClassFileVersion
The class file version to use for types that are not based on an existing class file.
classFileVersion
,
AuxiliaryType.NamingStrategy
The naming strategy to use for naming auxiliary types.
auxiliaryTypeNamingStrategy
,
AnnotationValueFilter.Factory
The annotation value filter factory to use.
annotationValueFilterFactory
,
AnnotationRetention
The annotation retention strategy to use.
annotationRetention
,
Implementation.Context.Factory
The implementation context factory to use.
implementationContextFactory
,
MethodGraph.Compiler
The method graph compiler to use.
methodGraphCompiler
,
TypeValidation
Determines if a type should be explicitly validated.
typeValidation
,
VisibilityBridgeStrategy
The visibility bridge strategy to apply.
visibilityBridgeStrategy
,
ClassWriterStrategy
The class writer strategy to use.
classWriterStrategy
,
LatentMatcher<? super MethodDescription>
A matcher for identifying methods that should be excluded from instrumentation.
ignoredMethods
,
TypeDescription
The original type that is being redefined or rebased.
originalType
,
ClassFileLocator
The class file locator for locating the original type's class file.
classFileLocator
)

Creates a redefinition dynamic type builder.

protected
RedefinitionDynamicTypeBuilder(InstrumentedType.WithFlexibleName
An instrumented type representing the subclass.
instrumentedType
,
FieldRegistry
The field pool to use.
fieldRegistry
,
MethodRegistry
The method pool to use.
methodRegistry
,
RecordComponentRegistry
The record component pool to use.
recordComponentRegistry
,
TypeAttributeAppender
The type attribute appender to apply onto the instrumented type.
typeAttributeAppender
,
AsmVisitorWrapper
The ASM visitor wrapper to apply onto the class writer.
asmVisitorWrapper
,
ClassFileVersion
The class file version to use for types that are not based on an existing class file.
classFileVersion
,
AuxiliaryType.NamingStrategy
The naming strategy to use for naming auxiliary types.
auxiliaryTypeNamingStrategy
,
AnnotationValueFilter.Factory
The annotation value filter factory to use.
annotationValueFilterFactory
,
AnnotationRetention
The annotation retention strategy to use.
annotationRetention
,
Implementation.Context.Factory
The implementation context factory to use.
implementationContextFactory
,
MethodGraph.Compiler
The method graph compiler to use.
methodGraphCompiler
,
TypeValidation
Determines if a type should be explicitly validated.
typeValidation
,
VisibilityBridgeStrategy
The visibility bridge strategy to apply.
visibilityBridgeStrategy
,
ClassWriterStrategy
The class writer strategy to use.
classWriterStrategy
,
LatentMatcher<? super MethodDescription>
A matcher for identifying methods that should be excluded from instrumentation.
ignoredMethods
,
List<? extends DynamicType>
A list of explicitly required auxiliary types.
auxiliaryTypes
,
TypeDescription
The original type that is being redefined or rebased.
originalType
,
ClassFileLocator
The class file locator for locating the original type's class file.
classFileLocator
)

Creates a redefinition dynamic type builder.

Method Summary

Modifier and TypeMethod and Description
protected DynamicType.Builder<T>
materialize(InstrumentedType.WithFlexibleName
The instrumented type.
instrumentedType
,
FieldRegistry
The current field registry.
fieldRegistry
,
MethodRegistry
The current method registry.
methodRegistry
,
RecordComponentRegistry
The record component pool to use.
recordComponentRegistry
,
TypeAttributeAppender
The type attribute appender to apply onto the instrumented type.
typeAttributeAppender
,
AsmVisitorWrapper
The ASM visitor wrapper to apply onto the class writer.
asmVisitorWrapper
,
ClassFileVersion
The class file version to define auxiliary types in.
classFileVersion
,
AuxiliaryType.NamingStrategy
The naming strategy for auxiliary types to apply.
auxiliaryTypeNamingStrategy
,
AnnotationValueFilter.Factory
The annotation value filter factory to apply.
annotationValueFilterFactory
,
AnnotationRetention
The annotation retention to apply.
annotationRetention
,
Implementation.Context.Factory
The implementation context factory to apply.
implementationContextFactory
,
MethodGraph.Compiler
The method graph compiler to use.
methodGraphCompiler
,
TypeValidation
The type validation state.
typeValidation
,
VisibilityBridgeStrategy
The visibility bridge strategy to apply.
visibilityBridgeStrategy
,
ClassWriterStrategy
The class writer strategy to use.
classWriterStrategy
,
LatentMatcher<? super MethodDescription>
A matcher for identifying methods that should be excluded from instrumentation.
ignoredMethods
,
List<? extends DynamicType>
A list of explicitly required auxiliary types.
auxiliaryTypes
)

Implements abstract net.bytebuddy.dynamic.DynamicType.Builder.AbstractBase.Adapter.materialize.

Materializes the supplied state of a dynamic type builder.
protected TypeWriter<T>
Inherited from net.bytebuddy.dynamic.scaffold.inline.AbstractInliningDynamicTypeBuilder:
toTypeWriter

Constructor Detail

RedefinitionDynamicTypeBuilderback to summary
public RedefinitionDynamicTypeBuilder(InstrumentedType.WithFlexibleName instrumentedType, ClassFileVersion classFileVersion, AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy, AnnotationValueFilter.Factory annotationValueFilterFactory, AnnotationRetention annotationRetention, Implementation.Context.Factory implementationContextFactory, MethodGraph.Compiler methodGraphCompiler, TypeValidation typeValidation, VisibilityBridgeStrategy visibilityBridgeStrategy, ClassWriterStrategy classWriterStrategy, LatentMatcher<? super MethodDescription> ignoredMethods, TypeDescription originalType, ClassFileLocator classFileLocator)

Creates a redefinition dynamic type builder.

Parameters
instrumentedType:InstrumentedType.WithFlexibleName

An instrumented type representing the subclass.

classFileVersion:ClassFileVersion

The class file version to use for types that are not based on an existing class file.

auxiliaryTypeNamingStrategy:AuxiliaryType.NamingStrategy

The naming strategy to use for naming auxiliary types.

annotationValueFilterFactory:AnnotationValueFilter.Factory

The annotation value filter factory to use.

annotationRetention:AnnotationRetention

The annotation retention strategy to use.

implementationContextFactory:Implementation.Context.Factory

The implementation context factory to use.

methodGraphCompiler:MethodGraph.Compiler

The method graph compiler to use.

typeValidation:TypeValidation

Determines if a type should be explicitly validated.

visibilityBridgeStrategy:VisibilityBridgeStrategy

The visibility bridge strategy to apply.

classWriterStrategy:ClassWriterStrategy

The class writer strategy to use.

ignoredMethods:LatentMatcher<? super MethodDescription>

A matcher for identifying methods that should be excluded from instrumentation.

originalType:TypeDescription

The original type that is being redefined or rebased.

classFileLocator:ClassFileLocator

The class file locator for locating the original type's class file.

RedefinitionDynamicTypeBuilderback to summary
protected RedefinitionDynamicTypeBuilder(InstrumentedType.WithFlexibleName instrumentedType, FieldRegistry fieldRegistry, MethodRegistry methodRegistry, RecordComponentRegistry recordComponentRegistry, TypeAttributeAppender typeAttributeAppender, AsmVisitorWrapper asmVisitorWrapper, ClassFileVersion classFileVersion, AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy, AnnotationValueFilter.Factory annotationValueFilterFactory, AnnotationRetention annotationRetention, Implementation.Context.Factory implementationContextFactory, MethodGraph.Compiler methodGraphCompiler, TypeValidation typeValidation, VisibilityBridgeStrategy visibilityBridgeStrategy, ClassWriterStrategy classWriterStrategy, LatentMatcher<? super MethodDescription> ignoredMethods, List<? extends DynamicType> auxiliaryTypes, TypeDescription originalType, ClassFileLocator classFileLocator)

Creates a redefinition dynamic type builder.

Parameters
instrumentedType:InstrumentedType.WithFlexibleName

An instrumented type representing the subclass.

fieldRegistry:FieldRegistry

The field pool to use.

methodRegistry:MethodRegistry

The method pool to use.

recordComponentRegistry:RecordComponentRegistry

The record component pool to use.

typeAttributeAppender:TypeAttributeAppender

The type attribute appender to apply onto the instrumented type.

asmVisitorWrapper:AsmVisitorWrapper

The ASM visitor wrapper to apply onto the class writer.

classFileVersion:ClassFileVersion

The class file version to use for types that are not based on an existing class file.

auxiliaryTypeNamingStrategy:AuxiliaryType.NamingStrategy

The naming strategy to use for naming auxiliary types.

annotationValueFilterFactory:AnnotationValueFilter.Factory

The annotation value filter factory to use.

annotationRetention:AnnotationRetention

The annotation retention strategy to use.

implementationContextFactory:Implementation.Context.Factory

The implementation context factory to use.

methodGraphCompiler:MethodGraph.Compiler

The method graph compiler to use.

typeValidation:TypeValidation

Determines if a type should be explicitly validated.

visibilityBridgeStrategy:VisibilityBridgeStrategy

The visibility bridge strategy to apply.

classWriterStrategy:ClassWriterStrategy

The class writer strategy to use.

ignoredMethods:LatentMatcher<? super MethodDescription>

A matcher for identifying methods that should be excluded from instrumentation.

auxiliaryTypes:List<? extends DynamicType>

A list of explicitly required auxiliary types.

originalType:TypeDescription

The original type that is being redefined or rebased.

classFileLocator:ClassFileLocator

The class file locator for locating the original type's class file.

Method Detail

materializeback to summary
protected DynamicType.Builder<T> materialize(InstrumentedType.WithFlexibleName instrumentedType, FieldRegistry fieldRegistry, MethodRegistry methodRegistry, RecordComponentRegistry recordComponentRegistry, TypeAttributeAppender typeAttributeAppender, AsmVisitorWrapper asmVisitorWrapper, ClassFileVersion classFileVersion, AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy, AnnotationValueFilter.Factory annotationValueFilterFactory, AnnotationRetention annotationRetention, Implementation.Context.Factory implementationContextFactory, MethodGraph.Compiler methodGraphCompiler, TypeValidation typeValidation, VisibilityBridgeStrategy visibilityBridgeStrategy, ClassWriterStrategy classWriterStrategy, LatentMatcher<? super MethodDescription> ignoredMethods, List<? extends DynamicType> auxiliaryTypes)

Implements abstract net.bytebuddy.dynamic.DynamicType.Builder.AbstractBase.Adapter.materialize.

Doc from net.bytebuddy.dynamic.DynamicType.Builder.AbstractBase.Adapter.materialize.

Materializes the supplied state of a dynamic type builder.

Parameters
instrumentedType:InstrumentedType.WithFlexibleName

The instrumented type.

fieldRegistry:FieldRegistry

The current field registry.

methodRegistry:MethodRegistry

The current method registry.

recordComponentRegistry:RecordComponentRegistry

The record component pool to use.

typeAttributeAppender:TypeAttributeAppender

The type attribute appender to apply onto the instrumented type.

asmVisitorWrapper:AsmVisitorWrapper

The ASM visitor wrapper to apply onto the class writer.

classFileVersion:ClassFileVersion

The class file version to define auxiliary types in.

auxiliaryTypeNamingStrategy:AuxiliaryType.NamingStrategy

The naming strategy for auxiliary types to apply.

annotationValueFilterFactory:AnnotationValueFilter.Factory

The annotation value filter factory to apply.

annotationRetention:AnnotationRetention

The annotation retention to apply.

implementationContextFactory:Implementation.Context.Factory

The implementation context factory to apply.

methodGraphCompiler:MethodGraph.Compiler

The method graph compiler to use.

typeValidation:TypeValidation

The type validation state.

visibilityBridgeStrategy:VisibilityBridgeStrategy

The visibility bridge strategy to apply.

classWriterStrategy:ClassWriterStrategy

The class writer strategy to use.

ignoredMethods:LatentMatcher<? super MethodDescription>

A matcher for identifying methods that should be excluded from instrumentation.

auxiliaryTypes:List<? extends DynamicType>

A list of explicitly required auxiliary types.

Returns:DynamicType.Builder<T>

A type builder that represents the supplied arguments.

Annotations
@Override
toTypeWriterback to summary
protected TypeWriter<T> toTypeWriter(TypePool typePool)

Implements abstract net.bytebuddy.dynamic.DynamicType.Builder.AbstractBase.UsingTypeWriter.toTypeWriter.

Doc from net.bytebuddy.dynamic.DynamicType.Builder.AbstractBase.UsingTypeWriter.toTypeWriter.

Creates a TypeWriter given the specified TypePool.

Parameters
typePool:TypePool

The TypePool to use.

Returns:TypeWriter<T>

An appropriate TypeWriter.