Interface Implementation.Context

    • Method Detail

      • register

        TypeDescription register​(AuxiliaryType auxiliaryType)
        Registers an auxiliary type as required for the current implementation. Registering a type will cause the creation of this type even if this type is not effectively used for the current implementation.
        Parameters:
        auxiliaryType - The auxiliary type that is required for the current implementation.
        Returns:
        A description of the registered auxiliary type.
      • cache

        FieldDescription.InDefinedShape cache​(StackManipulation fieldValue,
                                              TypeDescription fieldType)
        Caches a single value by storing it in form of a private, 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.
        Parameters:
        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.
        Returns:
        A description of a field that was defined on the instrumented type which contains the given value.
      • getInstrumentedType

        TypeDescription getInstrumentedType()
        Returns the instrumented type of the current implementation. The instrumented type is exposed with the intend of allowing optimal byte code generation and not for implementing checks or changing the behavior of a StackManipulation.
        Returns:
        The instrumented type of the current implementation.
      • getClassFileVersion

        ClassFileVersion getClassFileVersion()
        Returns the class file version of the currently created dynamic type.
        Returns:
        The class file version of the currently created dynamic type.