public static interface Implementation.Context.ExtractableView extends Implementation.Context
Implementation.Context
which
allows the retrieval of any registered auxiliary type.Modifier and Type | Interface and Description |
---|---|
static class |
Implementation.Context.ExtractableView.AbstractBase
An abstract base implementation of an extractable view of an implementation context.
|
static interface |
Implementation.Context.ExtractableView.InjectedCode
When draining an implementation context, a type initializer might be written to the created class
file.
|
Implementation.Context.Default, Implementation.Context.Disabled, Implementation.Context.ExtractableView, Implementation.Context.Factory
Modifier and Type | Method and Description |
---|---|
void |
drain(ClassVisitor classVisitor,
TypeWriter.MethodPool methodPool,
Implementation.Context.ExtractableView.InjectedCode injectedCode,
AnnotationValueFilter.Factory annotationValueFilterFactory,
boolean supportsBridges)
Writes any information that was registered with an
Implementation.Context
to the provided class visitor. |
List<DynamicType> |
getRegisteredAuxiliaryTypes()
Returns any
AuxiliaryType that was registered
with this Implementation.Context . |
boolean |
isRetainTypeInitializer()
Determines if this implementation context allows for the retention of a static type initializer.
|
void |
prohibitTypeInitializer()
Prohibits any instrumentation of an instrumented class's type initializer.
|
void |
setClassFileVersion(ClassFileVersion classFileVersion)
Sets the class file version this implementation context should represent.
|
cache, getClassFileVersion, getInstrumentedType, register
void setClassFileVersion(ClassFileVersion classFileVersion)
classFileVersion
- The class file version to represent.boolean isRetainTypeInitializer()
true
if the original type initializer can be retained. false
if the original type
initializer needs to be copied to another method for allowing code injection into the initializer.List<DynamicType> getRegisteredAuxiliaryTypes()
AuxiliaryType
that was registered
with this Implementation.Context
.void drain(ClassVisitor classVisitor, TypeWriter.MethodPool methodPool, Implementation.Context.ExtractableView.InjectedCode injectedCode, AnnotationValueFilter.Factory annotationValueFilterFactory, boolean supportsBridges)
Implementation.Context
to the provided class visitor. This contains any fields for value caching, any accessor method and it
writes the type initializer. The type initializer must therefore never be written manually.classVisitor
- The class visitor to which the extractable view is to be written.methodPool
- A method pool which is queried for any user code to add to the type initializer.injectedCode
- Potential code that is to be injected into the type initializer.annotationValueFilterFactory
- The annotation value filter factory to apply when writing annotation.supportsBridges
- true
if the created class file supports bridge methods.void prohibitTypeInitializer()
Copyright © 2014–2016. All rights reserved.