Class RebaseDynamicTypeBuilder<T>
java.lang.Object
net.bytebuddy.dynamic.DynamicType.Builder.AbstractBase<T>
net.bytebuddy.dynamic.DynamicType.Builder.AbstractBase.UsingTypeWriter<T>
net.bytebuddy.dynamic.DynamicType.Builder.AbstractBase.Adapter<T>
net.bytebuddy.dynamic.scaffold.inline.AbstractInliningDynamicTypeBuilder<T>
net.bytebuddy.dynamic.scaffold.inline.RebaseDynamicTypeBuilder<T>
- Type Parameters:
T
- A loaded type that the dynamic type is guaranteed to be a subtype of.
- All Implemented Interfaces:
DynamicType.Builder<T>
A type builder that rebases an instrumented type.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.bytebuddy.dynamic.DynamicType.Builder.AbstractBase.Adapter
DynamicType.Builder.AbstractBase.Adapter.FieldDefinitionAdapter, DynamicType.Builder.AbstractBase.Adapter.FieldMatchAdapter, DynamicType.Builder.AbstractBase.Adapter.InnerTypeDefinitionForMethodAdapter, DynamicType.Builder.AbstractBase.Adapter.InnerTypeDefinitionForTypeAdapter, DynamicType.Builder.AbstractBase.Adapter.MethodDefinitionAdapter, DynamicType.Builder.AbstractBase.Adapter.MethodMatchAdapter, DynamicType.Builder.AbstractBase.Adapter.OptionalMethodMatchAdapter, DynamicType.Builder.AbstractBase.Adapter.RecordComponentDefinitionAdapter, DynamicType.Builder.AbstractBase.Adapter.RecordComponentMatchAdapter, DynamicType.Builder.AbstractBase.Adapter.TypeVariableDefinitionAdapter
Nested classes/interfaces inherited from class net.bytebuddy.dynamic.DynamicType.Builder.AbstractBase
DynamicType.Builder.AbstractBase.Adapter<U>, DynamicType.Builder.AbstractBase.Delegator<U>, DynamicType.Builder.AbstractBase.UsingTypeWriter<U>
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.DynamicType.Builder
DynamicType.Builder.AbstractBase<S>, DynamicType.Builder.FieldDefinition<S>, DynamicType.Builder.InnerTypeDefinition<S>, DynamicType.Builder.MethodDefinition<S>, DynamicType.Builder.RecordComponentDefinition<S>, DynamicType.Builder.TypeVariableDefinition<S>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MethodNameTransformer
The method rebase resolver to use for determining the name of a rebased method.Fields inherited from class net.bytebuddy.dynamic.scaffold.inline.AbstractInliningDynamicTypeBuilder
classFileLocator, originalType
Fields inherited from class net.bytebuddy.dynamic.DynamicType.Builder.AbstractBase.Adapter
annotationRetention, annotationValueFilterFactory, asmVisitorWrapper, auxiliaryTypeNamingStrategy, auxiliaryTypes, classFileVersion, classReaderFactory, classWriterFactory, fieldRegistry, ignoredMethods, implementationContextFactory, instrumentedType, methodGraphCompiler, methodRegistry, recordComponentRegistry, typeAttributeAppender, typeValidation, visibilityBridgeStrategy
-
Constructor Summary
ConstructorsModifierConstructorDescriptionRebaseDynamicTypeBuilder
(InstrumentedType.WithFlexibleName instrumentedType, ClassFileVersion classFileVersion, AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy, AnnotationValueFilter.Factory annotationValueFilterFactory, AnnotationRetention annotationRetention, Implementation.Context.Factory implementationContextFactory, MethodGraph.Compiler methodGraphCompiler, TypeValidation typeValidation, VisibilityBridgeStrategy visibilityBridgeStrategy, AsmClassReader.Factory classReaderFactory, AsmClassWriter.Factory classWriterFactory, LatentMatcher<? super MethodDescription> ignoredMethods, TypeDescription originalType, ClassFileLocator classFileLocator, MethodNameTransformer methodNameTransformer) Creates a rebase dynamic type builder.protected
RebaseDynamicTypeBuilder
(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, AsmClassReader.Factory classReaderFactory, AsmClassWriter.Factory classWriterFactory, LatentMatcher<? super MethodDescription> ignoredMethods, List<? extends DynamicType> auxiliaryTypes, TypeDescription originalType, ClassFileLocator classFileLocator, MethodNameTransformer methodNameTransformer) Creates a rebase dynamic type builder. -
Method Summary
Modifier and TypeMethodDescriptionprotected 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, AsmClassReader.Factory classReaderFactory, AsmClassWriter.Factory classWriterFactory, LatentMatcher<? super MethodDescription> ignoredMethods, List<? extends DynamicType> auxiliaryTypes) Materializes the supplied state of a dynamic type builder.protected TypeWriter
<T> toTypeWriter
(TypePool typePool) Creates aTypeWriter
given the specifiedTypePool
.Methods inherited from class net.bytebuddy.dynamic.scaffold.inline.AbstractInliningDynamicTypeBuilder
toTypeWriter
Methods inherited from class net.bytebuddy.dynamic.DynamicType.Builder.AbstractBase.Adapter
annotateType, attribute, declaredTypes, defineConstructor, defineField, defineMethod, defineRecordComponent, field, ignoreAlso, implement, initializer, initializer, innerTypeOf, innerTypeOf, invokable, merge, modifiers, name, nestHost, nestMembers, permittedSubclass, recordComponent, require, suffix, topLevelType, toTypeDescription, transform, typeVariable, unsealed, visit
Methods inherited from class net.bytebuddy.dynamic.DynamicType.Builder.AbstractBase.UsingTypeWriter
make, make, wrap, wrap
Methods inherited from class net.bytebuddy.dynamic.DynamicType.Builder.AbstractBase
annotateType, annotateType, annotateType, constructor, declaredTypes, declaredTypes, declaredTypes, define, define, define, define, define, define, defineConstructor, defineConstructor, defineField, defineField, defineField, defineField, defineField, defineMethod, defineMethod, defineMethod, defineMethod, defineMethod, defineProperty, defineProperty, defineProperty, defineProperty, defineRecordComponent, field, ignoreAlso, implement, implement, implement, innerTypeOf, innerTypeOf, innerTypeOf, invokable, make, make, merge, method, modifiers, modifiers, nestHost, nestMembers, nestMembers, nestMembers, noNestMate, permittedSubclass, permittedSubclass, permittedSubclass, recordComponent, require, require, require, serialVersionUid, typeVariable, typeVariable, typeVariable, typeVariable, withHashCodeEquals, withToString, wrap, wrap
-
Field Details
-
methodNameTransformer
The method rebase resolver to use for determining the name of a rebased method.
-
-
Constructor Details
-
RebaseDynamicTypeBuilder
public RebaseDynamicTypeBuilder(InstrumentedType.WithFlexibleName instrumentedType, ClassFileVersion classFileVersion, AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy, AnnotationValueFilter.Factory annotationValueFilterFactory, AnnotationRetention annotationRetention, Implementation.Context.Factory implementationContextFactory, MethodGraph.Compiler methodGraphCompiler, TypeValidation typeValidation, VisibilityBridgeStrategy visibilityBridgeStrategy, AsmClassReader.Factory classReaderFactory, AsmClassWriter.Factory classWriterFactory, LatentMatcher<? super MethodDescription> ignoredMethods, TypeDescription originalType, ClassFileLocator classFileLocator, MethodNameTransformer methodNameTransformer) Creates a rebase dynamic type builder.- Parameters:
instrumentedType
- An instrumented type representing the subclass.classFileVersion
- The class file version to use for types that are not based on an existing class file.auxiliaryTypeNamingStrategy
- The naming strategy to use for naming auxiliary types.annotationValueFilterFactory
- The annotation value filter factory to use.annotationRetention
- The annotation retention strategy to use.implementationContextFactory
- The implementation context factory to use.methodGraphCompiler
- The method graph compiler to use.typeValidation
- Determines if a type should be explicitly validated.visibilityBridgeStrategy
- The visibility bridge strategy to apply.classReaderFactory
- The class reader factory to use.classWriterFactory
- The class writer factory to use.ignoredMethods
- A matcher for identifying methods that should be excluded from instrumentation.originalType
- The original type that is being redefined or rebased.classFileLocator
- The class file locator for locating the original type's class file.methodNameTransformer
- The method rebase resolver to use for determining the name of a rebased method.
-
RebaseDynamicTypeBuilder
protected RebaseDynamicTypeBuilder(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, AsmClassReader.Factory classReaderFactory, AsmClassWriter.Factory classWriterFactory, LatentMatcher<? super MethodDescription> ignoredMethods, List<? extends DynamicType> auxiliaryTypes, TypeDescription originalType, ClassFileLocator classFileLocator, MethodNameTransformer methodNameTransformer) Creates a rebase dynamic type builder.- Parameters:
instrumentedType
- An instrumented type representing the subclass.fieldRegistry
- The field pool to use.methodRegistry
- The method pool to use.recordComponentRegistry
- The record component pool to use.typeAttributeAppender
- The type attribute appender to apply onto the instrumented type.asmVisitorWrapper
- The ASM visitor wrapper to apply onto the class writer.classFileVersion
- The class file version to use for types that are not based on an existing class file.auxiliaryTypeNamingStrategy
- The naming strategy to use for naming auxiliary types.annotationValueFilterFactory
- The annotation value filter factory to use.annotationRetention
- The annotation retention strategy to use.implementationContextFactory
- The implementation context factory to use.methodGraphCompiler
- The method graph compiler to use.typeValidation
- Determines if a type should be explicitly validated.visibilityBridgeStrategy
- The visibility bridge strategy to apply.classReaderFactory
- The class reader factory to use.classWriterFactory
- The class writer factory to use.ignoredMethods
- A matcher for identifying methods that should be excluded from instrumentation.auxiliaryTypes
- A list of explicitly required auxiliary types.originalType
- The original type that is being redefined or rebased.classFileLocator
- The class file locator for locating the original type's class file.methodNameTransformer
- The method rebase resolver to use for determining the name of a rebased method.
-
-
Method Details
-
materialize
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, AsmClassReader.Factory classReaderFactory, AsmClassWriter.Factory classWriterFactory, LatentMatcher<? super MethodDescription> ignoredMethods, List<? extends DynamicType> auxiliaryTypes) Description copied from class:DynamicType.Builder.AbstractBase.Adapter
Materializes the supplied state of a dynamic type builder.- Specified by:
materialize
in classDynamicType.Builder.AbstractBase.Adapter<T>
- Parameters:
instrumentedType
- The instrumented type.fieldRegistry
- The current field registry.methodRegistry
- The current method registry.recordComponentRegistry
- The record component pool to use.typeAttributeAppender
- The type attribute appender to apply onto the instrumented type.asmVisitorWrapper
- The ASM visitor wrapper to apply onto the class writer.classFileVersion
- The class file version to define auxiliary types in.auxiliaryTypeNamingStrategy
- The naming strategy for auxiliary types to apply.annotationValueFilterFactory
- The annotation value filter factory to apply.annotationRetention
- The annotation retention to apply.implementationContextFactory
- The implementation context factory to apply.methodGraphCompiler
- The method graph compiler to use.typeValidation
- The type validation state.visibilityBridgeStrategy
- The visibility bridge strategy to apply.classReaderFactory
- The class reader factory to use.classWriterFactory
- The class writer factory to use.ignoredMethods
- A matcher for identifying methods that should be excluded from instrumentation.auxiliaryTypes
- A list of explicitly required auxiliary types.- Returns:
- A type builder that represents the supplied arguments.
-
toTypeWriter
Creates aTypeWriter
given the specifiedTypePool
.- Specified by:
toTypeWriter
in classDynamicType.Builder.AbstractBase.UsingTypeWriter<T>
- Parameters:
typePool
- TheTypePool
to use.- Returns:
- An appropriate
TypeWriter
.
-