Package com.kenai.jffi
Class LastError
- java.lang.Object
-
- com.kenai.jffi.LastError
-
public final class LastError extends java.lang.Object
Provides access to the value of errno on unix, or GetLastError on windows.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
LastError.SingletonHolder
Lazy-initialization singleton holder
-
Constructor Summary
Constructors Modifier Constructor Description private
LastError()
Creates a newLastError
instance
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description int
get()
Gets the errno set by the last C function invoked by the current thread.int
getError()
Deprecated.static LastError
getInstance()
Gets the singleton instance of theLastError
object.void
set(int value)
Sets the system errno value.
-
-
-
Field Detail
-
foreign
private final Foreign foreign
-
-
Method Detail
-
getInstance
public static final LastError getInstance()
Gets the singleton instance of theLastError
object.- Returns:
- An instance of
LastError
-
getError
@Deprecated public final int getError()
Deprecated.Gets the errno set by the last C function invoked by the current thread.- Returns:
- The value of errno/GetLastError()
-
get
public final int get()
Gets the errno set by the last C function invoked by the current thread.- Returns:
- The value of errno/GetLastError()
-
set
public final void set(int value)
Sets the system errno value.- Parameters:
value
- The value to set errno to.
-
-