Interface CopyFunc
- All Superinterfaces:
FunctionPointer
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
@Generated("org.javagi.JavaGI")
public interface CopyFunc
extends FunctionPointer
Functional interface declaration of the CopyFunc callback.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionrun(MemorySegment src, @Nullable MemorySegment data) A function of this signature is used to copy the node data when doing a deep-copy of a tree.default MemorySegmenttoCallback(Arena arena) Creates a native function pointer to theupcall(MemorySegment, MemorySegment)method.default MemorySegmentupcall(MemorySegment src, MemorySegment data) Theupcallmethod is called from native code.
-
Method Details
-
run
A function of this signature is used to copy the node data when doing a deep-copy of a tree.- Parameters:
src- A pointer to the data which should be copieddata- Additional data- Returns:
- A pointer to the copy
- Since:
- 2.4
-
upcall
Theupcallmethod is called from native code. The parameters are marshaled andrun(MemorySegment, MemorySegment)is executed. -
toCallback
Creates a native function pointer to theupcall(MemorySegment, MemorySegment)method.- Specified by:
toCallbackin interfaceFunctionPointer- Parameters:
arena- the arena in which the function pointer is allocated- Returns:
- the native function pointer
-