Record Class Spy.Invocation
java.lang.Object
java.lang.Record
cloud.opencode.base.test.mock.Spy.Invocation
- Record Components:
methodName- the method name | 方法名称args- the arguments | 参数
- Enclosing class:
Spy
Invocation record
调用记录
- Since:
- JDK 25, opencode-base-test V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
ConstructorsConstructorDescriptionInvocation(String methodName, Object[] args) Creates an instance of aInvocationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionObject[]args()Returns the value of theargsrecord component.final booleanIndicates whether some other object is "equal to" this one.getArg(int index) intfinal inthashCode()Returns a hash code value for this object.Returns the value of themethodNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Invocation
Creates an instance of aInvocationrecord class.- Parameters:
methodName- the value for themethodNamerecord componentargs- the value for theargsrecord component
-
-
Method Details
-
getArg
-
getArgCount
public int getArgCount() -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
methodName
Returns the value of themethodNamerecord component.- Returns:
- the value of the
methodNamerecord component
-
args
-