Enum Advice.OffsetMapping.Sort

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ENTER
      Indicates that an offset is mapped for an enter advice.
      EXIT
      Indicates that an offset is mapped for an exit advice.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Sort()  
    • Constructor Detail

      • Sort

        private Sort()
    • Method Detail

      • values

        public static Advice.OffsetMapping.Sort[] 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.OffsetMapping.Sort c : Advice.OffsetMapping.Sort.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.OffsetMapping.Sort 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
      • isPremature

        public abstract boolean isPremature​(MethodDescription methodDescription)
        Checks if an advice is executed in a premature state, i.e. the instrumented method is a constructor where the super constructor is not yet invoked. In this case, the this reference is not yet initialized and therefore not available.
        Parameters:
        methodDescription - The instrumented method.
        Returns:
        true if the advice is executed premature for the instrumented method.