Class RecordedInvocation.Builder

java.lang.Object
org.springframework.aot.agent.RecordedInvocation.Builder
Enclosing class:
RecordedInvocation

public static class RecordedInvocation.Builder extends Object
Builder for RecordedInvocation.
  • Method Details

    • onInstance

      public RecordedInvocation.Builder onInstance(Object instance)
      Set the this object instance used for this invocation.
      Parameters:
      instance - the current object instance, null in case of static invocations
      Returns:
      this, to facilitate method chaining
    • withArgument

      public RecordedInvocation.Builder withArgument(@Nullable Object argument)
      Use the given object as the unique argument.
      Parameters:
      argument - the invocation argument
      Returns:
      this, to facilitate method chaining
    • withArguments

      public RecordedInvocation.Builder withArguments(@Nullable Object... arguments)
      Use the given objects as the invocation arguments.
      Parameters:
      arguments - the invocation arguments
      Returns:
      this, to facilitate method chaining
    • returnValue

      public RecordedInvocation.Builder returnValue(@Nullable Object returnValue)
      Use the given object as the return value for the invocation.
      Parameters:
      returnValue - the return value
      Returns:
      this, to facilitate method chaining
    • build

      public RecordedInvocation build()
      Create a RecordedInvocation based on the state of this builder.
      Returns:
      a recorded invocation