Class AbstractInliningDynamicTypeBuilder<T>
- java.lang.Object
-
- net.bytebuddy.dynamic.DynamicType.Builder.AbstractBase<U>
-
- net.bytebuddy.dynamic.DynamicType.Builder.AbstractBase.Adapter<T>
-
- net.bytebuddy.dynamic.scaffold.inline.AbstractInliningDynamicTypeBuilder<T>
-
- Type Parameters:
T
- A loaded type that the dynamic type is guaranteed to be a subtype of.
- All Implemented Interfaces:
DynamicType.Builder<T>
- Direct Known Subclasses:
RebaseDynamicTypeBuilder
,RedefinitionDynamicTypeBuilder
@Enhance public abstract class AbstractInliningDynamicTypeBuilder<T> extends DynamicType.Builder.AbstractBase.Adapter<T>
An abstract base implementation of a dynamic type builder that alters an existing 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>
-
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
Fields Modifier and Type Field Description protected ClassFileLocator
classFileLocator
The class file locator for locating the original type's class file.protected TypeDescription
originalType
The original type that is being redefined or rebased.-
Fields inherited from class net.bytebuddy.dynamic.DynamicType.Builder.AbstractBase.Adapter
annotationRetention, annotationValueFilterFactory, asmVisitorWrapper, auxiliaryTypeNamingStrategy, auxiliaryTypes, classFileVersion, classWriterStrategy, fieldRegistry, ignoredMethods, implementationContextFactory, instrumentedType, methodGraphCompiler, methodRegistry, recordComponentRegistry, typeAttributeAppender, typeValidation, visibilityBridgeStrategy
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractInliningDynamicTypeBuilder(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, java.util.List<? extends DynamicType> auxiliaryTypes, TypeDescription originalType, ClassFileLocator classFileLocator)
Creates an inlining dynamic type builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DynamicType.Unloaded<T>
make(TypeResolutionStrategy typeResolutionStrategy)
Creates the dynamic type this builder represents.-
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, materialize, 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
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.bytebuddy.dynamic.DynamicType.Builder
make
-
-
-
-
Field Detail
-
originalType
protected final TypeDescription originalType
The original type that is being redefined or rebased.
-
classFileLocator
protected final ClassFileLocator classFileLocator
The class file locator for locating the original type's class file.
-
-
Constructor Detail
-
AbstractInliningDynamicTypeBuilder
protected AbstractInliningDynamicTypeBuilder(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, java.util.List<? extends DynamicType> auxiliaryTypes, TypeDescription originalType, ClassFileLocator classFileLocator)
Creates an inlining 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.classWriterStrategy
- The class writer strategy to use.ignoredMethods
- A matcher for identifying methods that should be excluded from instrumentation.auxiliaryTypes
- A list of explicitly defined 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.
-
-
Method Detail
-
make
public DynamicType.Unloaded<T> make(TypeResolutionStrategy typeResolutionStrategy)
Creates the dynamic type this builder represents. If the specified dynamic type is not legal, an
IllegalStateException
is thrown.The dynamic type is initialized using a
TypeResolutionStrategy.Passive
strategy. Using this strategy, noLoadedTypeInitializer
is run during the execution of the type's initializer such that noImplementation
used for executing the initializer must rely on such an initializer.- Parameters:
typeResolutionStrategy
- The type resolution strategy to use for the created type's initialization.- Returns:
- An unloaded dynamic type representing the type specified by this builder.
-
-