Class LastError

java.lang.Object
com.kenai.jffi.LastError

public final class LastError extends 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 final class 
    Lazy-initialization singleton holder
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final Foreign
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    Creates a new LastError instance
  • Method Summary

    Modifier and Type
    Method
    Description
    final int
    get()
    Gets the errno set by the last C function invoked by the current thread.
    final int
    Deprecated.
    static final LastError
    Gets the singleton instance of the LastError object.
    final void
    set(int value)
    Sets the system errno value.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • foreign

      private final Foreign foreign
  • Constructor Details

    • LastError

      private LastError()
      Creates a new LastError instance
  • Method Details

    • getInstance

      public static final LastError getInstance()
      Gets the singleton instance of the LastError 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.