Interface MemoryAccessor

    • Method Detail

      • guaranteeUsability

        void guaranteeUsability()
        Guarantees the full usability of this class by validating if all functionality is usable.
        Throws:
        Error
      • getDirectByteBufferAddress

        long getDirectByteBufferAddress​(ByteBuffer directBuffer)
      • deallocateDirectByteBuffer

        boolean deallocateDirectByteBuffer​(ByteBuffer directBuffer)
      • isDirectByteBuffer

        boolean isDirectByteBuffer​(ByteBuffer byteBuffer)
      • allocateMemory

        long allocateMemory​(long bytes)
      • reallocateMemory

        long reallocateMemory​(long address,
                              long bytes)
      • freeMemory

        void freeMemory​(long address)
      • fillMemory

        void fillMemory​(long targetAddress,
                        long length,
                        byte value)
      • get_byte

        byte get_byte​(long address)
      • get_boolean

        boolean get_boolean​(long address)
      • get_short

        short get_short​(long address)
      • get_char

        char get_char​(long address)
      • get_int

        int get_int​(long address)
      • get_float

        float get_float​(long address)
      • get_long

        long get_long​(long address)
      • get_double

        double get_double​(long address)
      • get_byte

        byte get_byte​(Object instance,
                      long offset)
      • get_boolean

        boolean get_boolean​(Object instance,
                            long offset)
      • get_short

        short get_short​(Object instance,
                        long offset)
      • get_char

        char get_char​(Object instance,
                      long offset)
      • get_int

        int get_int​(Object instance,
                    long offset)
      • get_float

        float get_float​(Object instance,
                        long offset)
      • get_long

        long get_long​(Object instance,
                      long offset)
      • get_double

        double get_double​(Object instance,
                          long offset)
      • getObject

        Object getObject​(Object instance,
                         long offset)
      • set_byte

        void set_byte​(long address,
                      byte value)
      • set_boolean

        void set_boolean​(long address,
                         boolean value)
      • set_short

        void set_short​(long address,
                       short value)
      • set_char

        void set_char​(long address,
                      char value)
      • set_int

        void set_int​(long address,
                     int value)
      • set_float

        void set_float​(long address,
                       float value)
      • set_long

        void set_long​(long address,
                      long value)
      • set_double

        void set_double​(long address,
                        double value)
      • set_byte

        void set_byte​(Object instance,
                      long offset,
                      byte value)
      • set_boolean

        void set_boolean​(Object instance,
                         long offset,
                         boolean value)
      • set_short

        void set_short​(Object instance,
                       long offset,
                       short value)
      • set_char

        void set_char​(Object instance,
                      long offset,
                      char value)
      • set_int

        void set_int​(Object instance,
                     long offset,
                     int value)
      • set_float

        void set_float​(Object instance,
                       long offset,
                       float value)
      • set_long

        void set_long​(Object instance,
                      long offset,
                      long value)
      • set_double

        void set_double​(Object instance,
                        long offset,
                        double value)
      • setObject

        void setObject​(Object instance,
                       long offset,
                       Object value)
      • set_byteInBytes

        void set_byteInBytes​(byte[] bytes,
                             int index,
                             byte value)
      • set_booleanInBytes

        void set_booleanInBytes​(byte[] bytes,
                                int index,
                                boolean value)
      • set_shortInBytes

        void set_shortInBytes​(byte[] bytes,
                              int index,
                              short value)
      • set_charInBytes

        void set_charInBytes​(byte[] bytes,
                             int index,
                             char value)
      • set_intInBytes

        void set_intInBytes​(byte[] bytes,
                            int index,
                            int value)
      • set_floatInBytes

        void set_floatInBytes​(byte[] bytes,
                              int index,
                              float value)
      • set_longInBytes

        void set_longInBytes​(byte[] bytes,
                             int index,
                             long value)
      • set_doubleInBytes

        void set_doubleInBytes​(byte[] bytes,
                               int index,
                               double value)
      • copyRange

        void copyRange​(long sourceAddress,
                       long targetAddress,
                       long length)
      • copyRangeToArray

        void copyRangeToArray​(long sourceAddress,
                              byte[] target)
      • copyRangeToArray

        void copyRangeToArray​(long sourceAddress,
                              boolean[] target)
      • copyRangeToArray

        void copyRangeToArray​(long sourceAddress,
                              short[] target)
      • copyRangeToArray

        void copyRangeToArray​(long sourceAddress,
                              char[] target)
      • copyRangeToArray

        void copyRangeToArray​(long sourceAddress,
                              int[] target)
      • copyRangeToArray

        void copyRangeToArray​(long sourceAddress,
                              float[] target)
      • copyRangeToArray

        void copyRangeToArray​(long sourceAddress,
                              long[] target)
      • copyRangeToArray

        void copyRangeToArray​(long sourceAddress,
                              double[] target)
      • copyArrayToAddress

        void copyArrayToAddress​(byte[] array,
                                long targetAddress)
      • copyArrayToAddress

        void copyArrayToAddress​(boolean[] array,
                                long targetAddress)
      • copyArrayToAddress

        void copyArrayToAddress​(short[] array,
                                long targetAddress)
      • copyArrayToAddress

        void copyArrayToAddress​(char[] array,
                                long targetAddress)
      • copyArrayToAddress

        void copyArrayToAddress​(int[] array,
                                long targetAddress)
      • copyArrayToAddress

        void copyArrayToAddress​(float[] array,
                                long targetAddress)
      • copyArrayToAddress

        void copyArrayToAddress​(long[] array,
                                long targetAddress)
      • copyArrayToAddress

        void copyArrayToAddress​(double[] array,
                                long targetAddress)
      • asByteArray

        default byte[] asByteArray​(long[] values)
      • asByteArray

        default byte[] asByteArray​(long value)
      • objectFieldOffset

        long objectFieldOffset​(Field field)
        Returns an unspecified, abstract "offset" of the passed Field to specify a generic access of the field's value for an instance of its declaring class that can be used with object-based methods like set_int(Object,long,int). Whether that offset is an actual low-level memory offset relative to an instance' field offset base or simply an index of the passed field in its declaring class' list of fields, is implementation-specific.
        Parameters:
        field - the Field whose abstract offset shall be determined.
        Returns:
        the passed Field's abstract offset.
      • objectFieldOffsets

        long[] objectFieldOffsets​(Field... fields)
        Array alias vor #objectFieldOffset(Field).
      • objectFieldOffset

        long objectFieldOffset​(Class<?> objectClass,
                               Field field)
        Similar to objectFieldOffset(Field), but with the specific object class.
        The difference is that the actual object's class is not the declaring class of its fields if it only extends another class but does not declare an object field itself.
        Parameters:
        objectClass -
        field -
        Returns:
      • objectFieldOffsets

        long[] objectFieldOffsets​(Class<?> objectClass,
                                  Field... fields)
        Array alias vor #objectFieldOffset(Class, Field).
      • objectFieldOffsets

        default long[] objectFieldOffsets​(Class<?> objectClass)
      • objectFieldOffsets

        default long[] objectFieldOffsets​(Class<?> objectClass,
                                          Predicate<? super Field> selector)
      • ensureClassInitialized

        void ensureClassInitialized​(Class<?> c)
      • ensureClassInitialized

        default void ensureClassInitialized​(Class<?> c,
                                            Iterable<Field> usedFields)
        Uses the passed fields if required by the implementation. If not, this method behaves exactely like ensureClassInitialized(Class).
        Parameters:
        c -
        usedFields -
      • isReversing

        default boolean isReversing()