Class MemberSubstitution.Substitution.Chain.Step.ForAssignment

    • Constructor Detail

      • ForAssignment

        protected ForAssignment​(@MaybeNull
                                TypeDescription.Generic result,
                                Assigner assigner)
        Creates a step for a type assignment.
        Parameters:
        result - The result type or null if the type of the substitution result should be targeted.
        assigner - The assigner to use.
    • Method Detail

      • castTo

        public static MemberSubstitution.Substitution.Chain.Step.Factory castTo​(java.lang.reflect.Type type)
        Creates a step factory that casts the current stack top value to the specified type.
        Parameters:
        type - The type that should be cast to.
        Returns:
        An appropriate step factory.
      • castToSubstitutionResult

        public static MemberSubstitution.Substitution.Chain.Step.Factory castToSubstitutionResult()
        Creates a step factory that casts the current stack top value to the expected return value.
        Returns:
        An appropriate step factory.
      • resolve

        public MemberSubstitution.Substitution.Chain.Step.Resolution resolve​(TypeDescription receiver,
                                                                             ByteCodeElement.Member original,
                                                                             TypeList.Generic parameters,
                                                                             TypeDescription.Generic result,
                                                                             JavaConstant.MethodHandle methodHandle,
                                                                             StackManipulation stackManipulation,
                                                                             TypeDescription.Generic current,
                                                                             java.util.Map<java.lang.Integer,​java.lang.Integer> offsets,
                                                                             int freeOffset)
        Resolves this step of a substitution chain.
        Specified by:
        resolve in interface MemberSubstitution.Substitution.Chain.Step
        Parameters:
        receiver - The target result type of the substitution.
        original - The byte code element that is currently substituted.
        parameters - The parameters of the substituted element.
        result - The resulting type of the substituted element.
        methodHandle - A method handle of the stackManipulation invocation that is being substituted.
        stackManipulation - The byte code instruction that is being substituted.
        current - The current type of the applied substitution that is the top element on the operand stack.
        offsets - The arguments of the substituted byte code element mapped to their local variable offsets.
        freeOffset - The first free offset in the local variable array.
        Returns:
        A resolved substitution step for the supplied inputs.