Class InvalidRuntime


  • class InvalidRuntime
    extends Runtime
    A Runtime subclass that throws exceptions for all methods
    • Field Detail

      • message

        private final java.lang.String message
      • cause

        private final java.lang.Throwable cause
    • Constructor Detail

      • InvalidRuntime

        InvalidRuntime​(java.lang.String message,
                       java.lang.Throwable cause)
    • Method Detail

      • findType

        public Type findType​(NativeType type)
        Description copied from class: Runtime
        Looks up the runtime-specific type that corresponds to the pseudo-type
        Specified by:
        findType in class Runtime
        Parameters:
        type - The native pseudo-type.
        Returns:
        A Type instance.
      • findType

        public Type findType​(TypeAlias type)
        Description copied from class: Runtime
        Looks up the runtime-specific type that corresponds to the type alias
        Specified by:
        findType in class Runtime
        Parameters:
        type - the type alias.
        Returns:
        A Type instance
      • getLastError

        public int getLastError()
        Description copied from class: Runtime
        Gets the last native error code.

        This returns the errno value that was set at the time of the last native function call.

        Specified by:
        getLastError in class Runtime
        Returns:
        The errno value.
      • setLastError

        public void setLastError​(int error)
        Description copied from class: Runtime
        Sets the native error code.
        Specified by:
        setLastError in class Runtime
        Parameters:
        error - The value to set errno to.
      • addressMask

        public long addressMask()
        Description copied from class: Runtime
        Gets the address mask for this runtime
        Specified by:
        addressMask in class Runtime
        Returns:
        The address mask for the runtime.
      • addressSize

        public int addressSize()
        Description copied from class: Runtime
        Gets the size of an address (e.g. a pointer) for this runtime
        Specified by:
        addressSize in class Runtime
        Returns:
        The size of an address in bytes.
      • longSize

        public int longSize()
        Description copied from class: Runtime
        Gets the size of a C long integer for this runtime
        Specified by:
        longSize in class Runtime
        Returns:
        The size of a C long integer in bytes.
      • byteOrder

        public java.nio.ByteOrder byteOrder()
        Description copied from class: Runtime
        Gets the native byte order of the runtime.
        Specified by:
        byteOrder in class Runtime
        Returns:
        The byte order of the runtime
      • isCompatible

        public boolean isCompatible​(Runtime other)
        Description copied from class: Runtime
        Indicates whether this Runtime instance is compatible with another Runtime instance.

        This is not the same as calling Object.equals(java.lang.Object) - this method only indicates whether or not artifacts from the runtime (e.g. memory addresses) are compatible with artifacts from this one.

        This is mostly for internal use.

        Specified by:
        isCompatible in class Runtime
        Parameters:
        other - the other runtime to test for compatibility
        Returns:
        true if the other runtime is compatible with this one
      • newLoadError

        private java.lang.UnsatisfiedLinkError newLoadError()