Class MethodCall.ArgumentLoader.ForStackManipulation

    • Field Detail

      • stackManipulation

        private final StackManipulation stackManipulation
        The stack manipulation to load.
      • typeDefinition

        private final TypeDefinition typeDefinition
        The type of the resulting value.
    • Constructor Detail

      • ForStackManipulation

        public ForStackManipulation​(StackManipulation stackManipulation,
                                    java.lang.reflect.Type type)
        Creates an argument loader that loads a stack manipulation as an argument.
        Parameters:
        stackManipulation - The stack manipulation to load.
        type - The type of the resulting value.
      • ForStackManipulation

        public ForStackManipulation​(StackManipulation stackManipulation,
                                    TypeDefinition typeDefinition)
        Creates an argument loader that loads a stack manipulation as an argument.
        Parameters:
        stackManipulation - The stack manipulation to load.
        typeDefinition - The type of the resulting value.
    • Method Detail

      • of

        public static MethodCall.ArgumentLoader.Factory of​(java.lang.Object value)
        Creates an argument loader that loads the supplied value as a constant. If the value cannot be represented in the constant pool, a field is created to store the value.
        Parameters:
        value - The value to load as an argument or null.
        Returns:
        An appropriate argument loader.
      • resolve

        public StackManipulation resolve​(ParameterDescription target,
                                         Assigner assigner,
                                         Assigner.Typing typing)
        Loads the argument that is represented by this instance onto the operand stack.
        Specified by:
        resolve in interface MethodCall.ArgumentLoader
        Parameters:
        target - The target parameter.
        assigner - The assigner to be used.
        typing - Indicates if dynamic type castings should be attempted for incompatible assignments.
        Returns:
        The stack manipulation that loads the represented argument onto the stack.