S
- The best known loaded type for the dynamically created type.public abstract static class TypeWriter.Default<S> extends Object implements TypeWriter<S>
TypeWriter
.Modifier and Type | Class and Description |
---|---|
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 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
Modifier and Type | Field and Description |
---|---|
protected static int |
ASM_API_VERSION
The ASM API version to use.
|
protected static int |
ASM_MANUAL_FLAG
A flag for ASM not to automatically compute any information such as operand stack sizes and stack map frames.
|
protected TypeAttributeAppender |
attributeAppender
The type attribute appender to apply.
|
protected AuxiliaryType.NamingStrategy |
auxiliaryTypeNamingStrategy
A naming strategy that is used for naming auxiliary types.
|
protected ClassFileVersion |
classFileVersion
The class file version of the written type.
|
protected ClassVisitorWrapper |
classVisitorWrapper
A class visitor wrapper to apply during instrumentation.
|
protected List<DynamicType> |
explicitAuxiliaryTypes
A list of explicit auxiliary types that are to be added to the created dynamic type.
|
protected TypeWriter.FieldPool |
fieldPool
The field pool to be used for instrumenting fields.
|
protected MethodList |
instrumentedMethods
A list of all instrumented methods.
|
protected TypeDescription |
instrumentedType
The instrumented type that is to be written.
|
protected LoadedTypeInitializer |
loadedTypeInitializer
The loaded type initializer of the instrumented type.
|
protected TypeWriter.MethodPool |
methodPool
The method pool to be used for instrumenting methods.
|
protected InstrumentedType.TypeInitializer |
typeInitializer
The type initializer of the instrumented type.
|
Modifier | Constructor and Description |
---|---|
protected |
Default(TypeDescription instrumentedType,
LoadedTypeInitializer loadedTypeInitializer,
InstrumentedType.TypeInitializer typeInitializer,
List<DynamicType> explicitAuxiliaryTypes,
ClassFileVersion classFileVersion,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
ClassVisitorWrapper classVisitorWrapper,
TypeAttributeAppender attributeAppender,
TypeWriter.FieldPool fieldPool,
TypeWriter.MethodPool methodPool,
MethodList instrumentedMethods)
Creates a new default type writer.
|
Modifier and Type | Method and Description |
---|---|
protected abstract byte[] |
create(Implementation.Context.ExtractableView implementationContext)
Creates the instrumented type.
|
boolean |
equals(Object other) |
static <U> TypeWriter<U> |
forCreation(MethodRegistry.Compiled methodRegistry,
TypeWriter.FieldPool fieldPool,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
ClassVisitorWrapper classVisitorWrapper,
TypeAttributeAppender attributeAppender,
ClassFileVersion classFileVersion)
Creates a type writer for creating a new type.
|
static <U> TypeWriter<U> |
forRebasing(MethodRegistry.Compiled methodRegistry,
TypeWriter.FieldPool fieldPool,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
ClassVisitorWrapper classVisitorWrapper,
TypeAttributeAppender attributeAppender,
ClassFileVersion classFileVersion,
ClassFileLocator classFileLocator,
TypeDescription targetType,
MethodRebaseResolver methodRebaseResolver)
Creates a type writer for creating a new type.
|
static <U> TypeWriter<U> |
forRedefinition(MethodRegistry.Compiled methodRegistry,
TypeWriter.FieldPool fieldPool,
AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
ClassVisitorWrapper classVisitorWrapper,
TypeAttributeAppender attributeAppender,
ClassFileVersion classFileVersion,
ClassFileLocator classFileLocator,
TypeDescription targetType)
Creates a type writer for creating a new type.
|
int |
hashCode() |
DynamicType.Unloaded<S> |
make()
Creates the dynamic type that is described by this type writer.
|
protected static final int ASM_MANUAL_FLAG
protected static final int ASM_API_VERSION
protected final TypeDescription instrumentedType
protected final LoadedTypeInitializer loadedTypeInitializer
protected final InstrumentedType.TypeInitializer typeInitializer
protected final List<DynamicType> explicitAuxiliaryTypes
protected final ClassFileVersion classFileVersion
protected final AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy
protected final ClassVisitorWrapper classVisitorWrapper
protected final TypeAttributeAppender attributeAppender
protected final TypeWriter.FieldPool fieldPool
protected final TypeWriter.MethodPool methodPool
protected final MethodList instrumentedMethods
protected Default(TypeDescription instrumentedType, LoadedTypeInitializer loadedTypeInitializer, InstrumentedType.TypeInitializer typeInitializer, List<DynamicType> explicitAuxiliaryTypes, ClassFileVersion classFileVersion, AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy, ClassVisitorWrapper classVisitorWrapper, TypeAttributeAppender attributeAppender, TypeWriter.FieldPool fieldPool, TypeWriter.MethodPool methodPool, MethodList instrumentedMethods)
instrumentedType
- The instrumented type that is to be written.loadedTypeInitializer
- The loaded type initializer of the instrumented type.typeInitializer
- The type initializer of the instrumented type.explicitAuxiliaryTypes
- A list of explicit auxiliary types that are to be added to the created dynamic type.classFileVersion
- The class file version of the written type.auxiliaryTypeNamingStrategy
- A naming strategy that is used for naming auxiliary types.classVisitorWrapper
- A class visitor wrapper to apply during instrumentation.attributeAppender
- The type attribute appender to apply.fieldPool
- The field pool to be used for instrumenting fields.methodPool
- The method pool to be used for instrumenting methods.instrumentedMethods
- A list of all instrumented methods.public static <U> TypeWriter<U> forCreation(MethodRegistry.Compiled methodRegistry, TypeWriter.FieldPool fieldPool, AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy, ClassVisitorWrapper classVisitorWrapper, TypeAttributeAppender attributeAppender, ClassFileVersion classFileVersion)
U
- The best known loaded type for the dynamically created type.methodRegistry
- The method registry to use for creating the type.fieldPool
- The field pool to use.auxiliaryTypeNamingStrategy
- A naming strategy for naming auxiliary types.classVisitorWrapper
- The class visitor wrapper to apply when creating the type.attributeAppender
- The attribute appender to use.classFileVersion
- The class file version of the created type.public static <U> TypeWriter<U> forRebasing(MethodRegistry.Compiled methodRegistry, TypeWriter.FieldPool fieldPool, AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy, ClassVisitorWrapper classVisitorWrapper, TypeAttributeAppender attributeAppender, ClassFileVersion classFileVersion, ClassFileLocator classFileLocator, TypeDescription targetType, MethodRebaseResolver methodRebaseResolver)
U
- The best known loaded type for the dynamically created type.methodRegistry
- The method registry to use for creating the type.fieldPool
- The field pool to use.auxiliaryTypeNamingStrategy
- A naming strategy for naming auxiliary types.classVisitorWrapper
- The class visitor wrapper to apply when creating the type.attributeAppender
- The attribute appender to use.classFileVersion
- The minimum class file version of the created type.classFileLocator
- The class file locator to use.methodRebaseResolver
- The method rebase resolver to use.targetType
- The target type that is to be rebased.public static <U> TypeWriter<U> forRedefinition(MethodRegistry.Compiled methodRegistry, TypeWriter.FieldPool fieldPool, AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy, ClassVisitorWrapper classVisitorWrapper, TypeAttributeAppender attributeAppender, ClassFileVersion classFileVersion, ClassFileLocator classFileLocator, TypeDescription targetType)
U
- The best known loaded type for the dynamically created type.methodRegistry
- The method registry to use for creating the type.fieldPool
- The field pool to use.auxiliaryTypeNamingStrategy
- A naming strategy for naming auxiliary types.classVisitorWrapper
- The class visitor wrapper to apply when creating the type.attributeAppender
- The attribute appender to use.classFileVersion
- The minimum class file version of the created type.classFileLocator
- The class file locator to use.targetType
- The target type that is to be rebased.public DynamicType.Unloaded<S> make()
TypeWriter
make
in interface TypeWriter<S>
protected abstract byte[] create(Implementation.Context.ExtractableView implementationContext)
implementationContext
- The implementation context to use.Copyright © 2014–2015. All rights reserved.