Class RecordedInvocation.Builder
java.lang.Object
org.springframework.aot.agent.RecordedInvocation.Builder
- Enclosing class:
RecordedInvocation
Builder for
RecordedInvocation.- Since:
- 6.0
- Author:
- Brian Clozel
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Create aRecordedInvocationbased on the state of this builder.onInstance(Object instance) Set thethisobject instance used for this invocation.returnValue(@Nullable Object returnValue) Use the given object as the return value for the invocation.withArgument(@Nullable Object argument) Use the given object as the unique argument.withArguments(Object @Nullable ... arguments) Use the given objects as the invocation arguments.
-
Method Details
-
onInstance
Set thethisobject instance used for this invocation.- Parameters:
instance- the current object instance,nullin case of static invocations- Returns:
this, to facilitate method chaining
-
withArgument
Use the given object as the unique argument.- Parameters:
argument- the invocation argument- Returns:
this, to facilitate method chaining
-
withArguments
Use the given objects as the invocation arguments.- Parameters:
arguments- the invocation arguments- Returns:
this, to facilitate method chaining
-
returnValue
Use the given object as the return value for the invocation.- Parameters:
returnValue- the return value- Returns:
this, to facilitate method chaining
-
build
Create aRecordedInvocationbased on the state of this builder.- Returns:
- a recorded invocation
-