U
- A loaded type that the built type is guaranteed to be a subclass of.public abstract static class DynamicType.Builder.AbstractBase.UsingTypeWriter<U> extends DynamicType.Builder.AbstractBase<U>
TypeWriter
to create a dynamic type.DynamicType.Builder.AbstractBase.Adapter<U>, DynamicType.Builder.AbstractBase.Delegator<U>, DynamicType.Builder.AbstractBase.UsingTypeWriter<U>
DynamicType.Builder.AbstractBase<S>, DynamicType.Builder.FieldDefinition<S>, DynamicType.Builder.InnerTypeDefinition<S>, DynamicType.Builder.MethodDefinition<S>, DynamicType.Builder.RecordComponentDefinition<S>, DynamicType.Builder.TypeVariableDefinition<S>
Constructor and Description |
---|
UsingTypeWriter() |
Modifier and Type | Method and Description |
---|---|
DynamicType.Unloaded<U> |
make(TypeResolutionStrategy typeResolutionStrategy)
Creates the dynamic type this builder represents.
|
DynamicType.Unloaded<U> |
make(TypeResolutionStrategy typeResolutionStrategy,
TypePool typePool)
Creates the dynamic type this builder represents.
|
protected abstract TypeWriter<U> |
toTypeWriter()
Creates a
TypeWriter without an explicitly specified TypePool . |
protected abstract TypeWriter<U> |
toTypeWriter(TypePool typePool)
Creates a
TypeWriter given the specified TypePool . |
ContextClassVisitor |
wrap(ClassVisitor classVisitor,
int writerFlags,
int readerFlags)
Wraps a class visitor with the configuration that is represented by this dynamic type builder, using a
default
TypePool . |
ContextClassVisitor |
wrap(ClassVisitor classVisitor,
TypePool typePool,
int writerFlags,
int readerFlags)
Wraps a class visitor with the configuration that is represented by this dynamic type builder.
|
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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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
public ContextClassVisitor wrap(ClassVisitor classVisitor, int writerFlags, int readerFlags)
TypePool
. A wrapper might not apply all features that are normally applied by Byte
Buddy, if those features require control of the class loading life cycle. Neither does a wrapper define
auxiliary types. It is therefore recommended to use Implementation.Context.Disabled
.classVisitor
- The class visitor to wrap.writerFlags
- The ASM writer flags to apply.readerFlags
- The ASM reader flags to apply.public ContextClassVisitor wrap(ClassVisitor classVisitor, TypePool typePool, int writerFlags, int readerFlags)
Implementation.Context.Disabled
.classVisitor
- The class visitor to wrap.typePool
- A type pool that is used for computing stack map frames by the underlying class writer, if required.writerFlags
- The ASM writer flags to apply.readerFlags
- The ASM reader flags to apply.public DynamicType.Unloaded<U> 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, no
LoadedTypeInitializer
is run during the execution of the type's initializer such that no Implementation
used for
executing the initializer must rely on such an initializer.
typeResolutionStrategy
- The type resolution strategy to use for the created type's initialization.public DynamicType.Unloaded<U> make(TypeResolutionStrategy typeResolutionStrategy, TypePool typePool)
IllegalStateException
is thrown.typeResolutionStrategy
- The type resolution strategy to use for the created type's initialization.typePool
- A type pool that is used for computing stack map frames by the underlying class writer, if required.protected abstract TypeWriter<U> toTypeWriter()
TypeWriter
without an explicitly specified TypePool
.TypeWriter
.protected abstract TypeWriter<U> toTypeWriter(TypePool typePool)
TypeWriter
given the specified TypePool
.typePool
- The TypePool
to use.TypeWriter
.Copyright © 2014–2024. All rights reserved.