public static class Implementation.Context.Disabled extends Implementation.Context.ExtractableView.AbstractBase
| Modifier and Type | Class and Description |
|---|---|
static class |
Implementation.Context.Disabled.Factory
A factory for creating a
Implementation.Context.Disabled. |
Implementation.Context.ExtractableView.AbstractBaseImplementation.Context.Default, Implementation.Context.Disabled, Implementation.Context.ExtractableViewclassFileVersion, instrumentedType| Modifier | Constructor and Description |
|---|---|
protected |
Disabled(TypeDescription instrumentedType,
ClassFileVersion classFileVersion)
Creates a new disabled implementation context.
|
| Modifier and Type | Method and Description |
|---|---|
FieldDescription.InDefinedShape |
cache(StackManipulation fieldValue,
TypeDescription fieldType)
Caches a single value by storing it in form of a
private, final and static field. |
void |
drain(TypeInitializer.Drain drain,
ClassVisitor classVisitor,
AnnotationValueFilter.Factory annotationValueFilterFactory)
Writes any information that was registered with an
Implementation.Context
to the provided class visitor. |
boolean |
equals(Object other) |
List<DynamicType> |
getAuxiliaryTypes()
Returns any
AuxiliaryType that was registered
with this Implementation.Context. |
int |
hashCode() |
TypeDescription |
register(AuxiliaryType auxiliaryType)
Registers an auxiliary type as required for the current implementation.
|
String |
toString() |
getClassFileVersion, getInstrumentedTypeprotected Disabled(TypeDescription instrumentedType, ClassFileVersion classFileVersion)
instrumentedType - The instrumented type.classFileVersion - The class file version to create the class in.public List<DynamicType> getAuxiliaryTypes()
Implementation.Context.ExtractableViewAuxiliaryType that was registered
with this Implementation.Context.public void drain(TypeInitializer.Drain drain, ClassVisitor classVisitor, AnnotationValueFilter.Factory annotationValueFilterFactory)
Implementation.Context.ExtractableViewImplementation.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.drain - The drain to write the type initializer to.classVisitor - The class visitor to which the extractable view is to be written.annotationValueFilterFactory - The annotation value filter factory to apply when writing annotation.public TypeDescription register(AuxiliaryType auxiliaryType)
Implementation.ContextauxiliaryType - The auxiliary type that is required for the current implementation.public FieldDescription.InDefinedShape cache(StackManipulation fieldValue, TypeDescription fieldType)
Implementation.Contextprivate, final and static field.
By caching values, expensive instance creations can be avoided and object identity can be preserved.
The field is initiated in a generated class's static initializer.fieldValue - A stack manipulation for creating the value that is to be cached in a static field.
After executing the stack manipulation, exactly one value must be put onto the operand
stack which is assignable to the given fieldType.fieldType - The type of the field for storing the cached value. This field's type determines the value
that is put onto the operand stack by this method's returned stack manipulation.Copyright © 2014–2016. All rights reserved.