Enum MemberSubstitution.Substitution.Stubbing

    • Constructor Detail

      • Stubbing

        private Stubbing()
    • Method Detail

      • values

        public static MemberSubstitution.Substitution.Stubbing[] 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.Substitution.Stubbing c : MemberSubstitution.Substitution.Stubbing.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.Substitution.Stubbing 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
      • resolve

        public StackManipulation resolve​(MemberSubstitution.Target target,
                                         TypeList.Generic parameters,
                                         TypeDescription.Generic result,
                                         JavaConstant.MethodHandle methodHandle,
                                         StackManipulation stackManipulation,
                                         int freeOffset)
        Resolves this substitution into a stack manipulation.
        Specified by:
        resolve in interface MemberSubstitution.Substitution
        Parameters:
        target - The target member of invokedynamic invocation.
        parameters - All parameters that serve as input to this access.
        result - The result that is expected from the interaction or void if no result is expected.
        methodHandle - A method handle describing the substituted expression.
        stackManipulation - The original byte code expression that is being executed.
        freeOffset - The first free offset of the local variable array that can be used for storing values.
        Returns:
        A stack manipulation that represents the access.