java.lang.Object
org.jnetpcap.internal.ForeignDowncall<E>
- Type Parameters:
E
- the element type
- Direct Known Subclasses:
PcapForeignDowncall
The Class ForeignDowncall.
-
Constructor Summary
ConstructorDescriptionForeignDowncall
(String symbolName) Instantiates a new foreign downcall.ForeignDowncall
(String symbolName, MemorySegment symbolAddress, MethodHandle handle, Function<String, E> exceptionFactory) Instantiates a new foreign downcall.ForeignDowncall
(String symbolName, Throwable cause) Instantiates a new foreign downcall. -
Method Summary
Modifier and TypeMethodDescriptionaddress()
Address.handle()
Handle.int
Invoke int.int
invokeInt
(IntFunction<String> messageFactory, Object... args) Invoke int.int
Invoke int.long
invokeLong
(Object... args) Invoke long.long
invokeLong
(LongFunction<String> messageFactory, Object... args) Invoke long.long
invokeLong
(Supplier<String> messageFactory, Object... args) Invoke long.<U> U
Invoke obj.<U> U
Invoke obj.invokeString
(Object... args) Invoke string.invokeString
(Supplier<String> messageFactory, Object... args) Invoke string.void
invokeVoid
(Object... args) Invoke void.boolean
Checks if is native symbol resolved.Symbol name.toString()
To string.protected void
validateInt
(int value, IntFunction<String> errorFactory) Validate int.protected void
validateInt
(int value, Supplier<String> errorFactory) Validate int.protected void
validateLong
(long value, LongFunction<String> errorFactory) Validate long.protected void
validateLong
(long value, Supplier<String> errorFactory) Validate long.protected void
validateObj
(Object obj, Supplier<String> errorFactory) Validate obj.
-
Constructor Details
-
ForeignDowncall
Instantiates a new foreign downcall.- Parameters:
symbolName
- the symbol name
-
ForeignDowncall
public ForeignDowncall(String symbolName, MemorySegment symbolAddress, MethodHandle handle, Function<String, E> exceptionFactory) Instantiates a new foreign downcall.- Parameters:
symbolName
- the symbol namesymbolAddress
- the symbol addresshandle
- the handleexceptionFactory
- the exception factory
-
ForeignDowncall
-
-
Method Details
-
handle
-
invokeInt
Invoke int.- Parameters:
messageFactory
- the message factoryargs
- the args- Returns:
- the int
- Throws:
E
- the e
-
invokeInt
-
invokeInt
-
invokeLong
Invoke long.- Parameters:
messageFactory
- the message factoryargs
- the args- Returns:
- the long
- Throws:
E
- the e
-
invokeLong
-
invokeLong
-
invokeObj
Invoke obj.- Type Parameters:
U
- the generic type- Parameters:
args
- the args- Returns:
- the u
-
invokeObj
-
invokeString
-
invokeString
-
invokeVoid
-
isNativeSymbolResolved
public boolean isNativeSymbolResolved()Checks if is native symbol resolved.- Returns:
- true, if is native symbol resolved
-
address
-
symbolName
-
validateInt
Validate int.- Parameters:
value
- the valueerrorFactory
- the error factory- Throws:
E
- the e
-
validateInt
-
validateLong
Validate long.- Parameters:
value
- the valueerrorFactory
- the error factory- Throws:
E
- the e
-
validateLong
-
validateObj
-
toString
-