public static class Implementation.Context.Default extends Object implements Implementation.Context.ExtractableView, AuxiliaryType.MethodAccessorFactory
Implementation.Context.ExtractableView
 which serves as its own AuxiliaryType.MethodAccessorFactory.| Modifier and Type | Class and Description | 
|---|---|
| protected static class  | Implementation.Context.Default.AbstractDelegationRecordAn abstract method pool entry that delegates the implementation of a method to itself. | 
| protected static class  | Implementation.Context.Default.AbstractPropertyAccessorMethodA base implementation of a method that accesses a property of an instrumented type. | 
| protected static class  | Implementation.Context.Default.AccessorMethodA description of an accessor method to access another method from outside the instrumented type. | 
| protected static class  | Implementation.Context.Default.AccessorMethodDelegationAn implementation of a  TypeWriter.MethodPool.Recordfor implementing
 an accessor method. | 
| protected static class  | Implementation.Context.Default.CacheValueFieldA description of a field that stores a cached value. | 
| protected static class  | Implementation.Context.Default.FieldCacheEntryA field cache entry for uniquely identifying a cached field. | 
| protected static class  | Implementation.Context.Default.FieldGetterA description of a field getter method. | 
| protected static class  | Implementation.Context.Default.FieldGetterDelegationAn implementation for a field getter. | 
| protected static class  | Implementation.Context.Default.FieldSetterA description of a field setter method. | 
| protected static class  | Implementation.Context.Default.FieldSetterDelegationAn implementation for a field setter. | 
Implementation.Context.ExtractableView.InjectedCodeImplementation.Context.Default, Implementation.Context.ExtractableViewAuxiliaryType.MethodAccessorFactory.Illegal| Modifier and Type | Field and Description | 
|---|---|
| static String | ACCESSOR_METHOD_SUFFIXThe name suffix to be appended to an accessor method. | 
| static String | FIELD_CACHE_PREFIXThe name prefix to be prepended to a field storing a cached value. | 
| Constructor and Description | 
|---|
| Default(TypeDescription instrumentedType,
       AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy,
       InstrumentedType.TypeInitializer typeInitializer,
       ClassFileVersion classFileVersion)Creates a new implementation context. | 
| Modifier and Type | Method and Description | 
|---|---|
| FieldDescription | cache(StackManipulation fieldValue,
     TypeDescription fieldType)Caches a single value by storing it in form of a  private,finalandstaticfield. | 
| void | drain(ClassVisitor classVisitor,
     TypeWriter.MethodPool methodPool,
     Implementation.Context.ExtractableView.InjectedCode injectedCode)Writes any information that was registered with an  Implementation.Contextto the provided class visitor. | 
| List<DynamicType> | getRegisteredAuxiliaryTypes()Returns any  AuxiliaryTypethat was registered
 with thisImplementation.Context. | 
| TypeDescription | register(AuxiliaryType auxiliaryType)Registers an auxiliary type as required for the current implementation. | 
| MethodDescription.InDefinedShape | registerAccessorFor(Implementation.SpecialMethodInvocation specialMethodInvocation)Registers an accessor method for a
  Implementation.SpecialMethodInvocationwhich cannot itself be
 triggered invoked directly from outside a type. | 
| MethodDescription.InDefinedShape | registerGetterFor(FieldDescription fieldDescription)Registers a getter for the given  FieldDescriptionwhich might
 itself not be accessible from outside the class. | 
| MethodDescription.InDefinedShape | registerSetterFor(FieldDescription fieldDescription)Registers a setter for the given  FieldDescriptionwhich might
 itself not be accessible from outside the class. | 
| String | toString() | 
public static final String ACCESSOR_METHOD_SUFFIX
public static final String FIELD_CACHE_PREFIX
public Default(TypeDescription instrumentedType, AuxiliaryType.NamingStrategy auxiliaryTypeNamingStrategy, InstrumentedType.TypeInitializer typeInitializer, ClassFileVersion classFileVersion)
instrumentedType - The description of the type that is currently subject of creation.auxiliaryTypeNamingStrategy - The naming strategy for naming an auxiliary type.typeInitializer - The type initializer of the created instrumented type.classFileVersion - The class file version of the created class.public MethodDescription.InDefinedShape registerAccessorFor(Implementation.SpecialMethodInvocation specialMethodInvocation)
AuxiliaryType.MethodAccessorFactoryImplementation.SpecialMethodInvocation which cannot itself be
 triggered invoked directly from outside a type. The method is registered on the instrumented type
 with package-private visibility, similarly to a Java compiler's accessor methods.registerAccessorFor in interface AuxiliaryType.MethodAccessorFactoryspecialMethodInvocation - The special method invocation.public MethodDescription.InDefinedShape registerGetterFor(FieldDescription fieldDescription)
AuxiliaryType.MethodAccessorFactoryFieldDescription which might
 itself not be accessible from outside the class. The returned getter method defines the field type as
 its return type, does not take any arguments and is of package-private visibility, similarly to the Java
 compiler's accessor methods. If the field is static, this accessor method is also static.registerGetterFor in interface AuxiliaryType.MethodAccessorFactoryfieldDescription - The field which is to be accessed.public MethodDescription.InDefinedShape registerSetterFor(FieldDescription fieldDescription)
AuxiliaryType.MethodAccessorFactoryFieldDescription which might
 itself not be accessible from outside the class. The returned setter method defines the field type as
 its only argument type, returns void and is of package-private visibility, similarly to the Java
 compiler's accessor methods. If the field is static, this accessor method is also static.registerSetterFor in interface AuxiliaryType.MethodAccessorFactoryfieldDescription - The field which is to be accessed.public TypeDescription register(AuxiliaryType auxiliaryType)
Implementation.Contextregister in interface Implementation.ContextauxiliaryType - The auxiliary type that is required for the current implementation.public List<DynamicType> getRegisteredAuxiliaryTypes()
Implementation.Context.ExtractableViewAuxiliaryType that was registered
 with this Implementation.Context.getRegisteredAuxiliaryTypes in interface Implementation.Context.ExtractableViewpublic FieldDescription 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.cache in interface Implementation.ContextfieldValue - 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.public void drain(ClassVisitor classVisitor, TypeWriter.MethodPool methodPool, Implementation.Context.ExtractableView.InjectedCode injectedCode)
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 in interface Implementation.Context.ExtractableViewclassVisitor - 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.Copyright © 2014–2015. All rights reserved.