Record Class ForeignFunctionCallResult
java.lang.Object
java.lang.Record
net.jrodolfo.java_evolution.java22.foreign_function.ForeignFunctionCallResult
- Record Components:
functionName- the native function that was calledinput- the Java input copied into native memoryvalue- the value returned to JavajavaType- the Java type used for the returned value
public record ForeignFunctionCallResult(String functionName, String input, Number value, String javaType)
extends Record
Captures the observable result of a small native function call.
The record keeps the examples easy to test without printing from the example classes. The Java type is included because foreign calls cross a boundary where C types and Java types must be mapped deliberately.
-
Constructor Summary
ConstructorsConstructorDescriptionForeignFunctionCallResult(String functionName, String input, Number value, String javaType) Creates an instance of aForeignFunctionCallResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefunctionNamerecord component.final inthashCode()Returns a hash code value for this object.input()Returns the value of theinputrecord component.javaType()Returns the value of thejavaTyperecord component.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
ForeignFunctionCallResult
Creates an instance of aForeignFunctionCallResultrecord class.- Parameters:
functionName- the value for thefunctionNamerecord componentinput- the value for theinputrecord componentvalue- the value for thevaluerecord componentjavaType- the value for thejavaTyperecord component
-
-
Method Details
-
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). -
functionName
Returns the value of thefunctionNamerecord component.- Returns:
- the value of the
functionNamerecord component
-
input
-
value
-
javaType
-