S
- The best known loaded type for the dynamically created type.@HashCodeAndEqualsPlugin.Enhance public abstract static class TypeWriter.Default<S> extends Object implements TypeWriter<S>
TypeWriter
.Modifier and Type | Class and Description |
---|---|
protected static class |
TypeWriter.Default.ClassDumpAction
An action to write a class file to the dumping location.
|
static class |
TypeWriter.Default.ForCreation<U>
A type writer that creates a class file that is not based upon another, existing class.
|
static class |
TypeWriter.Default.ForInlining<U>
A type writer that inlines the created type into an existing class file.
|
protected class |
TypeWriter.Default.UnresolvedType
An unresolved type.
|
protected static class |
TypeWriter.Default.ValidatingClassVisitor
A class validator that validates that a class only defines members that are appropriate for the sort of the generated class.
|
TypeWriter.Default<S>, TypeWriter.FieldPool, TypeWriter.MethodPool, TypeWriter.RecordComponentPool
Modifier and Type | Field and Description |
---|---|
protected AnnotationRetention |
annotationRetention
The annotation retention to apply.
|
protected AnnotationValueFilter.Factory |
annotationValueFilterFactory
The annotation value filter factory to apply.
|
protected AsmVisitorWrapper |
asmVisitorWrapper
The ASM visitor wrapper to apply onto the class writer.
|
protected AuxiliaryType.NamingStrategy |
auxiliaryTypeNamingStrategy
The naming strategy for auxiliary types to apply.
|
protected List<? extends DynamicType> |
auxiliaryTypes
The explicit auxiliary types to add to the created type.
|
protected ClassFileVersion |
classFileVersion
The class file specified by the user.
|
protected ClassWriterStrategy |
classWriterStrategy
The class writer strategy to use.
|
protected static String |
DUMP_FOLDER
A folder for dumping class files or
null if no dump should be generated. |
protected TypeWriter.FieldPool |
fieldPool
The field pool to use.
|
protected FieldList<FieldDescription.InDefinedShape> |
fields
The instrumented type's declared fields.
|
protected Implementation.Context.Factory |
implementationContextFactory
The implementation context factory to apply.
|
protected MethodList<?> |
instrumentedMethods
The instrumented methods relevant to this type creation.
|
protected TypeDescription |
instrumentedType
The instrumented type to be created.
|
protected LoadedTypeInitializer |
loadedTypeInitializer
The loaded type initializer to apply onto the created type after loading.
|
protected MethodList<?> |
methods
The instrumented type's methods that are declared or inherited.
|
protected TypeWriter.RecordComponentPool |
recordComponentPool
The record component pool to use.
|
protected RecordComponentList<RecordComponentDescription.InDefinedShape> |
recordComponents
The instrumented type's record components.
|
protected TypeAttributeAppender |
typeAttributeAppender
The type attribute appender to apply onto the instrumented type.
|
protected TypeInitializer |
typeInitializer
The type initializer to include in the created type's type initializer.
|
protected TypePool |
typePool
The type pool to use for computing stack map frames, if required.
|
protected TypeValidation |
typeValidation
Determines if a type should be explicitly validated.
|
DUMP_PROPERTY
Modifier | Constructor and Description |
---|---|
protected |
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.
|
Modifier and Type | Method and Description |
---|---|
protected abstract TypeWriter.Default.UnresolvedType |
create(TypeInitializer typeInitializer,
TypeWriter.Default.ClassDumpAction.Dispatcher dispatcher)
Creates an unresolved version of the dynamic type.
|
static <U> TypeWriter<U> |
forCreation(MethodRegistry.Compiled methodRegistry,
List<? extends DynamicType> auxiliaryTypes,
TypeWriter.FieldPool fieldPool,
TypeWriter.RecordComponentPool recordComponentPool,
TypeAttributeAppender typeAttributeAppender,
AsmVisitorWrapper asmVisitorWrapper,
ClassFileVersion classFileVersion,
AnnotationValueFilter.Factory annotationValueFilterFactory,
AnnotationRetention annotationRetention,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
Implementation.Context.Factory implementationContextFactory,
TypeValidation typeValidation,
ClassWriterStrategy classWriterStrategy,
TypePool typePool)
Creates a type writer for creating a new type.
|
static <U> TypeWriter<U> |
forDecoration(TypeDescription instrumentedType,
ClassFileVersion classFileVersion,
List<? extends DynamicType> auxiliaryTypes,
List<? extends MethodDescription> 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 type writer for decorating a type.
|
static <U> TypeWriter<U> |
forRebasing(MethodRegistry.Prepared methodRegistry,
List<? extends DynamicType> auxiliaryTypes,
TypeWriter.FieldPool fieldPool,
TypeWriter.RecordComponentPool recordComponentPool,
TypeAttributeAppender typeAttributeAppender,
AsmVisitorWrapper asmVisitorWrapper,
ClassFileVersion classFileVersion,
AnnotationValueFilter.Factory annotationValueFilterFactory,
AnnotationRetention annotationRetention,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
Implementation.Context.Factory implementationContextFactory,
TypeValidation typeValidation,
ClassWriterStrategy classWriterStrategy,
TypePool typePool,
TypeDescription originalType,
ClassFileLocator classFileLocator,
MethodRebaseResolver methodRebaseResolver)
Creates a type writer for rebasing a type.
|
static <U> TypeWriter<U> |
forRedefinition(MethodRegistry.Prepared methodRegistry,
List<? extends DynamicType> auxiliaryTypes,
TypeWriter.FieldPool fieldPool,
TypeWriter.RecordComponentPool recordComponentPool,
TypeAttributeAppender typeAttributeAppender,
AsmVisitorWrapper asmVisitorWrapper,
ClassFileVersion classFileVersion,
AnnotationValueFilter.Factory annotationValueFilterFactory,
AnnotationRetention annotationRetention,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
Implementation.Context.Factory implementationContextFactory,
TypeValidation typeValidation,
ClassWriterStrategy classWriterStrategy,
TypePool typePool,
TypeDescription originalType,
ClassFileLocator classFileLocator)
Creates a type writer for redefining a type.
|
DynamicType.Unloaded<S> |
make(TypeResolutionStrategy.Resolved typeResolutionStrategy)
Creates the dynamic type that is described by this type writer.
|
protected static final String DUMP_FOLDER
null
if no dump should be generated.protected final TypeDescription instrumentedType
protected final ClassFileVersion classFileVersion
protected final TypeWriter.FieldPool fieldPool
protected final TypeWriter.RecordComponentPool recordComponentPool
protected final List<? extends DynamicType> auxiliaryTypes
protected final FieldList<FieldDescription.InDefinedShape> fields
protected final MethodList<?> methods
protected final MethodList<?> instrumentedMethods
protected final RecordComponentList<RecordComponentDescription.InDefinedShape> recordComponents
protected final LoadedTypeInitializer loadedTypeInitializer
protected final TypeInitializer typeInitializer
protected final TypeAttributeAppender typeAttributeAppender
protected final AsmVisitorWrapper asmVisitorWrapper
protected final AnnotationValueFilter.Factory annotationValueFilterFactory
protected final AnnotationRetention annotationRetention
protected final AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy
protected final Implementation.Context.Factory implementationContextFactory
protected final TypeValidation typeValidation
protected final ClassWriterStrategy classWriterStrategy
protected final TypePool typePool
protected 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)
instrumentedType
- The instrumented type to be created.classFileVersion
- The class file specified by the user.fieldPool
- The field pool to use.recordComponentPool
- The record component pool to use.auxiliaryTypes
- The explicit auxiliary types to add to the created type.fields
- The instrumented type's declared fields.methods
- The instrumented type's declared and virtually inherited methods.instrumentedMethods
- The instrumented methods relevant to this type creation.recordComponents
- The instrumented type's record components.loadedTypeInitializer
- The loaded type initializer to apply onto the created type after loading.typeInitializer
- The type initializer to include in the created type's type initializer.typeAttributeAppender
- The type attribute appender to apply onto the instrumented type.asmVisitorWrapper
- The ASM visitor wrapper to apply onto the class writer.annotationValueFilterFactory
- The annotation value filter factory to apply.annotationRetention
- The annotation retention to apply.auxiliaryTypeNamingStrategy
- The naming strategy for auxiliary types to apply.implementationContextFactory
- The implementation context factory to apply.typeValidation
- Determines if a type should be explicitly validated.classWriterStrategy
- The class writer strategy to use.typePool
- The type pool to use for computing stack map frames, if required.public static <U> TypeWriter<U> forCreation(MethodRegistry.Compiled methodRegistry, List<? extends DynamicType> auxiliaryTypes, TypeWriter.FieldPool fieldPool, TypeWriter.RecordComponentPool recordComponentPool, TypeAttributeAppender typeAttributeAppender, AsmVisitorWrapper asmVisitorWrapper, ClassFileVersion classFileVersion, AnnotationValueFilter.Factory annotationValueFilterFactory, AnnotationRetention annotationRetention, AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy, Implementation.Context.Factory implementationContextFactory, TypeValidation typeValidation, ClassWriterStrategy classWriterStrategy, TypePool typePool)
U
- A loaded type that the instrumented type guarantees to subclass.methodRegistry
- The compiled method registry to use.auxiliaryTypes
- A list of explicitly required auxiliary types.fieldPool
- The field pool to use.recordComponentPool
- 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 when no explicit class file version is applied.annotationValueFilterFactory
- The annotation value filter factory to apply.annotationRetention
- The annotation retention to apply.auxiliaryTypeNamingStrategy
- The naming strategy for auxiliary types to apply.implementationContextFactory
- The implementation context factory to apply.typeValidation
- Determines if a type should be explicitly validated.classWriterStrategy
- The class writer strategy to use.typePool
- The type pool to use for computing stack map frames, if required.public static <U> TypeWriter<U> forRedefinition(MethodRegistry.Prepared methodRegistry, List<? extends DynamicType> auxiliaryTypes, TypeWriter.FieldPool fieldPool, TypeWriter.RecordComponentPool recordComponentPool, TypeAttributeAppender typeAttributeAppender, AsmVisitorWrapper asmVisitorWrapper, ClassFileVersion classFileVersion, AnnotationValueFilter.Factory annotationValueFilterFactory, AnnotationRetention annotationRetention, AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy, Implementation.Context.Factory implementationContextFactory, TypeValidation typeValidation, ClassWriterStrategy classWriterStrategy, TypePool typePool, TypeDescription originalType, ClassFileLocator classFileLocator)
U
- A loaded type that the instrumented type guarantees to subclass.methodRegistry
- The compiled method registry to use.auxiliaryTypes
- A list of explicitly required auxiliary types.fieldPool
- The field pool to use.recordComponentPool
- 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 when no explicit class file version is applied.annotationValueFilterFactory
- The annotation value filter factory to apply.annotationRetention
- The annotation retention to apply.auxiliaryTypeNamingStrategy
- The naming strategy for auxiliary types to apply.implementationContextFactory
- The implementation context factory to apply.typeValidation
- Determines if a type should be explicitly validated.classWriterStrategy
- The class writer strategy to use.typePool
- The type pool to use for computing stack map frames, if required.originalType
- The original type that is being redefined or rebased.classFileLocator
- The class file locator for locating the original type's class file.public static <U> TypeWriter<U> forRebasing(MethodRegistry.Prepared methodRegistry, List<? extends DynamicType> auxiliaryTypes, TypeWriter.FieldPool fieldPool, TypeWriter.RecordComponentPool recordComponentPool, TypeAttributeAppender typeAttributeAppender, AsmVisitorWrapper asmVisitorWrapper, ClassFileVersion classFileVersion, AnnotationValueFilter.Factory annotationValueFilterFactory, AnnotationRetention annotationRetention, AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy, Implementation.Context.Factory implementationContextFactory, TypeValidation typeValidation, ClassWriterStrategy classWriterStrategy, TypePool typePool, TypeDescription originalType, ClassFileLocator classFileLocator, MethodRebaseResolver methodRebaseResolver)
U
- A loaded type that the instrumented type guarantees to subclass.methodRegistry
- The compiled method registry to use.auxiliaryTypes
- A list of explicitly required auxiliary types.fieldPool
- The field pool to use.recordComponentPool
- 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 when no explicit class file version is applied.annotationValueFilterFactory
- The annotation value filter factory to apply.annotationRetention
- The annotation retention to apply.auxiliaryTypeNamingStrategy
- The naming strategy for auxiliary types to apply.implementationContextFactory
- The implementation context factory to apply.typeValidation
- Determines if a type should be explicitly validated.classWriterStrategy
- The class writer strategy to use.typePool
- The type pool to use for computing stack map frames, if required.originalType
- The original type that is being redefined or rebased.classFileLocator
- The class file locator for locating the original type's class file.methodRebaseResolver
- The method rebase resolver to use for rebasing names.public static <U> TypeWriter<U> forDecoration(TypeDescription instrumentedType, ClassFileVersion classFileVersion, List<? extends DynamicType> auxiliaryTypes, List<? extends MethodDescription> 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)
U
- A loaded type that the instrumented type guarantees to subclass.instrumentedType
- The instrumented type.classFileVersion
- The class file version to use when no explicit class file version is applied.auxiliaryTypes
- A list of explicitly required auxiliary types.methods
- The methods to instrument.typeAttributeAppender
- The type attribute appender to apply onto the instrumented type.asmVisitorWrapper
- The ASM visitor wrapper to apply onto the class writer.annotationValueFilterFactory
- The annotation value filter factory to apply.annotationRetention
- The annotation retention to apply.auxiliaryTypeNamingStrategy
- The naming strategy for auxiliary types to apply.implementationContextFactory
- The implementation context factory to apply.typeValidation
- Determines if a type should be explicitly validated.classWriterStrategy
- The class writer strategy to use.typePool
- The type pool to use for computing stack map frames, if required.classFileLocator
- The class file locator for locating the original type's class file.public DynamicType.Unloaded<S> make(TypeResolutionStrategy.Resolved typeResolutionStrategy)
make
in interface TypeWriter<S>
typeResolutionStrategy
- The type resolution strategy to use.protected abstract TypeWriter.Default.UnresolvedType create(TypeInitializer typeInitializer, TypeWriter.Default.ClassDumpAction.Dispatcher dispatcher)
typeInitializer
- The type initializer to use.dispatcher
- A dispatcher for dumping class files.Copyright © 2014–2020. All rights reserved.