Enum InvocationType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<InvocationType>

    public enum InvocationType
    extends java.lang.Enum<InvocationType>
    Specifies the point at which the probe method is invoked.
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ENTER
      The probe method will be called before any code of the intercepted method is called.
      EXCEPTION
      The probe method will be called when the intercepted method throws an exception.
      EXIT
      The probe method will be called when the intercepted method exits, either by returning normally or by throwing an exception.
      RETURN
      The probe method will be called when the intercepted method returns normally.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static InvocationType valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static InvocationType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • ENTER

        public static final InvocationType ENTER
        The probe method will be called before any code of the intercepted method is called. You cannot use ReturnValue or ExceptionValue parameters for methods of this type.
      • EXIT

        public static final InvocationType EXIT
        The probe method will be called when the intercepted method exits, either by returning normally or by throwing an exception. You can use both ReturnValue and ExceptionValue parameters for methods of this type. If the intercepted method returns normally, the ExceptionValue parameter will be null. If the method throws an exception, the ReturnValue parameter will be null.

        This type cannot be used for constructors.

      • RETURN

        public static final InvocationType RETURN
        The probe method will be called when the intercepted method returns normally. You can use a ReturnValue parameter, but no ExceptionValue parameter for methods of this type.
      • EXCEPTION

        public static final InvocationType EXCEPTION
        The probe method will be called when the intercepted method throws an exception. You can use an ExceptionValue parameter, but no ReturnValue parameter for methods of this type.

        This type cannot be used for constructors.

    • Method Detail

      • values

        public static InvocationType[] 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 (InvocationType c : InvocationType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static InvocationType 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