Interface AutowiredArguments

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface AutowiredArguments
Resolved arguments to be autowired.
Since:
6.0
Author:
Phillip Webb, Stephane Nicoll
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    default <T> T
    get(int index)
    Return the resolved argument at the specified index.
    default <T> T
    get(int index, Class<T> requiredType)
    Return the resolved argument at the specified index.
    default Object
    getObject(int index)
    Return the resolved argument at the specified index.
    of(Object[] arguments)
    Factory method to create a new AutowiredArguments instance from the given object array.
    Return the arguments as an object array.
  • Method Details

    • get

      @Nullable default <T> T get(int index, Class<T> requiredType)
      Return the resolved argument at the specified index.
      Type Parameters:
      T - the type of the argument
      Parameters:
      index - the argument index
      requiredType - the required argument type
      Returns:
      the argument
    • get

      @Nullable default <T> T get(int index)
      Return the resolved argument at the specified index.
      Type Parameters:
      T - the type of the argument
      Parameters:
      index - the argument index
      Returns:
      the argument
    • getObject

      @Nullable default Object getObject(int index)
      Return the resolved argument at the specified index.
      Parameters:
      index - the argument index
      Returns:
      the argument
    • toArray

      Object[] toArray()
      Return the arguments as an object array.
      Returns:
      the arguments as an object array
    • of

      static AutowiredArguments of(Object[] arguments)
      Factory method to create a new AutowiredArguments instance from the given object array.
      Parameters:
      arguments - the arguments
      Returns:
      a new AutowiredArguments instance