Package org.springframework.aot.agent
Class RecordedInvocation
java.lang.Object
org.springframework.aot.agent.RecordedInvocation
Record of an invocation of a method relevant to 
RuntimeHints.
 The RuntimeHintsAgent instruments bytecode and intercepts invocations of
 specific methods; invocations are recorded during test execution
 to match them against an existing RuntimeHints configuration.
- Since:
- 6.0
- Author:
- Brian Clozel
- 
Nested Class SummaryNested Classes
- 
Method SummaryModifier and TypeMethodDescription<T> TgetArgument(int index) Return the argument value at the given index used for the current reflection invocation.Return the argument values used for the current reflection invocation.Return the types of the arguments used for the current reflection invocation.getArgumentTypes(int index) Return the types of the arguments used for the current reflection invocation, starting from the given index.Return the category ofRuntimeHintsthis invocation relates to.<T> TReturn the instance of the object being invoked.Return the Type reference of the object being invoked.Return a simple representation of the method invoked here.<T> TReturn the value actually returned by the invoked method.Return the stack trace of the current invocation.booleanisStatic()Return whether the current invocation is static.booleanmatches(RuntimeHints hints) Whether the given hints cover the current invocation.static RecordedInvocation.Builderof(org.springframework.aot.agent.InstrumentedMethod instrumentedMethod) Initialize a builder for the givenInstrumentedMethod.toString()
- 
Method Details- 
ofpublic static RecordedInvocation.Builder of(org.springframework.aot.agent.InstrumentedMethod instrumentedMethod) Initialize a builder for the givenInstrumentedMethod.- Parameters:
- instrumentedMethod- the instrumented method
- Returns:
- a builder
 
- 
getHintTypeReturn the category ofRuntimeHintsthis invocation relates to.- Returns:
- the hint type
 
- 
getMethodReferenceReturn a simple representation of the method invoked here.- Returns:
- the method reference
 
- 
getStackFramesReturn the stack trace of the current invocation.- Returns:
- the stack frames
 
- 
getInstancepublic <T> T getInstance()Return the instance of the object being invoked.- Returns:
- the object instance
- Throws:
- IllegalStateException- in case of static invocations (there is no- this)
 
- 
getInstanceTypeReferenceReturn the Type reference of the object being invoked.- Returns:
- the instance type reference, or null
- Throws:
- IllegalStateException- in case of static invocations (there is no- this)
 
- 
isStaticpublic boolean isStatic()Return whether the current invocation is static.- Returns:
- trueif the invocation is static
 
- 
getArgumentsReturn the argument values used for the current reflection invocation.- Returns:
- the invocation arguments
 
- 
getArgumentpublic <T> T getArgument(int index) Return the argument value at the given index used for the current reflection invocation.- Parameters:
- index- the parameter index
- Returns:
- the argument at the given index
 
- 
getArgumentTypesReturn the types of the arguments used for the current reflection invocation.- Returns:
- the argument types
 
- 
getArgumentTypesReturn the types of the arguments used for the current reflection invocation, starting from the given index.- Returns:
- the argument types, starting at the given index
 
- 
getReturnValueReturn the value actually returned by the invoked method.- Returns:
- the value returned by the invocation
 
- 
matchesWhether the given hints cover the current invocation.If the given hint doesn't match this invocation might fail at execution time depending on the target runtime. - Returns:
- whether the given hints match
 
- 
toString
 
-