Enum Advice.StackMapFrameHandler.Default.TranslationMode

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      COPY
      A translation mode that simply copies the original frames which are available when translating frames of the instrumented method.
      ENTER
      A translation mode for the enter advice that considers that the this reference might not be initialized for a constructor.
      EXIT
      A translation mode for an exit advice where the this reference is always initialized.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private TranslationMode()  
    • Constructor Detail

      • TranslationMode

        private TranslationMode()
    • Method Detail

      • values

        public static Advice.StackMapFrameHandler.Default.TranslationMode[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (Advice.StackMapFrameHandler.Default.TranslationMode c : Advice.StackMapFrameHandler.Default.TranslationMode.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static Advice.StackMapFrameHandler.Default.TranslationMode valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • copy

        protected abstract int copy​(TypeDescription instrumentedType,
                                    MethodDescription instrumentedMethod,
                                    MethodDescription methodDescription,
                                    java.lang.Object[] localVariable,
                                    java.lang.Object[] translated)
        Copies the fixed parameters of the instrumented method onto the operand stack.
        Parameters:
        instrumentedType - The instrumented type.
        instrumentedMethod - The instrumented method.
        methodDescription - The method for which a frame is created.
        localVariable - The original local variable array.
        translated - The array containing the translated frames.
        Returns:
        The amount of frames added to the translated frame array.
      • isPossibleThisFrameValue

        protected abstract boolean isPossibleThisFrameValue​(TypeDescription instrumentedType,
                                                            MethodDescription instrumentedMethod,
                                                            java.lang.Object frame)
        Checks if a variable value in a stack map frame is a legal value for describing a this reference.
        Parameters:
        instrumentedType - The instrumented type.
        instrumentedMethod - The instrumented method.
        frame - The frame value representing the this reference.
        Returns:
        true if the value is a legal representation of the this reference.