Enum MemberSubstitution.Replacement.InvocationType

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      OTHER
      Describes any method invocation that is not virtual or a super method invocation.
      SUPER
      Describes a super method invocation.
      VIRTUAL
      Desribes a virtual method invocation.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private InvocationType()  
    • Constructor Detail

      • InvocationType

        private InvocationType()
    • Method Detail

      • values

        public static MemberSubstitution.Replacement.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 (MemberSubstitution.Replacement.InvocationType c : MemberSubstitution.Replacement.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 MemberSubstitution.Replacement.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
      • of

        protected static MemberSubstitution.Replacement.InvocationType of​(int opcode,
                                                                          MethodDescription methodDescription)
        Resolves an invocation type.
        Parameters:
        opcode - The opcode that is used for invoking the method.
        methodDescription - The method that is being invoked.
        Returns:
        The invokation type for the method given that opcode.
      • matches

        protected boolean matches​(boolean includeVirtualCalls,
                                  boolean includeSuperCalls)
        Checks if this invokation type matches the specified inputs.
        Parameters:
        includeVirtualCalls - true if a virtual method should be matched.
        includeSuperCalls - true if a super method call should be matched.
        Returns:
        true if this invocation type matches the specified parameters.