java.lang.Object
org.jnetpcap.internal.ForeignDowncall<E>
- Type Parameters:
E- the element type
- Direct Known Subclasses:
PcapForeignDowncall
The Class ForeignDowncall.
-
Constructor Summary
ConstructorsConstructorDescriptionForeignDowncall(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.intInvoke int.intinvokeInt(IntFunction<String> messageFactory, Object... args) Invoke int.intInvoke int.longinvokeLong(Object... args) Invoke long.longinvokeLong(LongFunction<String> messageFactory, Object... args) Invoke long.longinvokeLong(Supplier<String> messageFactory, Object... args) Invoke long.<U> UInvoke obj.<U> UInvoke obj.invokeString(Object... args) Invoke string.invokeString(Supplier<String> messageFactory, Object... args) Invoke string.voidinvokeVoid(Object... args) Invoke void.booleanChecks if is native symbol resolved.Symbol name.toString()To string.protected voidvalidateInt(int value, IntFunction<String> errorFactory) Validate int.protected voidvalidateInt(int value, Supplier<String> errorFactory) Validate int.protected voidvalidateLong(long value, LongFunction<String> errorFactory) Validate long.protected voidvalidateLong(long value, Supplier<String> errorFactory) Validate long.protected voidvalidateObj(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
-