public final class MemoryAccessorGeneric extends Object implements MemoryAccessor
| Modifier and Type | Method and Description |
|---|---|
long |
allocateMemory(long bytes) |
void |
copyArrayToAddress(boolean[] array,
long targetAddress) |
void |
copyArrayToAddress(byte[] array,
long targetAddress) |
void |
copyArrayToAddress(char[] array,
long targetAddress) |
void |
copyArrayToAddress(double[] array,
long targetAddress) |
void |
copyArrayToAddress(float[] array,
long targetAddress) |
void |
copyArrayToAddress(int[] array,
long targetAddress) |
void |
copyArrayToAddress(long[] array,
long targetAddress) |
void |
copyArrayToAddress(short[] array,
long targetAddress) |
void |
copyRange(long sourceAddress,
long targetAddress,
long length) |
void |
copyRangeToArray(long sourceAddress,
boolean[] target) |
void |
copyRangeToArray(long sourceAddress,
byte[] target) |
void |
copyRangeToArray(long sourceAddress,
char[] target) |
void |
copyRangeToArray(long sourceAddress,
double[] target) |
void |
copyRangeToArray(long sourceAddress,
float[] target) |
void |
copyRangeToArray(long sourceAddress,
int[] target) |
void |
copyRangeToArray(long sourceAddress,
long[] target) |
void |
copyRangeToArray(long sourceAddress,
short[] target) |
MemoryStatistics |
createHeapMemoryStatistics() |
MemoryStatistics |
createNonHeapMemoryStatistics() |
boolean |
deallocateDirectByteBuffer(ByteBuffer directBuffer) |
static Class<?> |
determineMostSpecificDeclaringClass(Field[] fields) |
void |
ensureClassInitialized(Class<?> c) |
void |
ensureClassInitialized(Class<?> c,
Iterable<Field> usedFields)
Uses the passed fields if required by the implementation.
|
void |
fillMemory(long targetAddress,
long length,
byte value) |
void |
freeMemory(long address) |
boolean |
get_boolean(long address) |
boolean |
get_boolean(Object instance,
long offset) |
byte |
get_byte(long address) |
byte |
get_byte(Object instance,
long offset) |
char |
get_char(long address) |
char |
get_char(Object instance,
long offset) |
double |
get_double(long address) |
double |
get_double(Object instance,
long offset) |
float |
get_float(long address) |
float |
get_float(Object instance,
long offset) |
int |
get_int(long address) |
int |
get_int(Object instance,
long offset) |
long |
get_long(long address) |
long |
get_long(Object instance,
long offset) |
short |
get_short(long address) |
short |
get_short(Object instance,
long offset) |
long |
getDirectByteBufferAddress(ByteBuffer directBuffer) |
Object |
getObject(Object instance,
long offset) |
ByteBuffer |
guaranteeDirectByteBuffer(ByteBuffer directBuffer) |
void |
guaranteeUsability()
Guarantees the full usability of this class by validating if all functionality is usable.
|
<T> T |
instantiateBlank(Class<T> c) |
boolean |
isDirectByteBuffer(ByteBuffer byteBuffer) |
ByteBuffer[] |
lookupChain(int chunkSizeIndex) |
ByteBuffer[] |
lookupChainNonNull(int chunkSizeIndex,
int chainIndex) |
static MemoryAccessorGeneric |
New() |
static MemoryAccessorGeneric |
New(DefaultInstantiator defaultInstantiator) |
static MemoryAccessorGeneric |
New(DefaultInstantiator defaultInstantiator,
DirectBufferDeallocator directBufferDeallocator) |
static MemoryAccessorGeneric |
New(DirectBufferDeallocator directBufferDeallocator) |
long |
objectFieldOffset(Class<?> objectClass,
Field field)
Similar to
MemoryAccessor.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. |
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). |
long[] |
objectFieldOffsets(Class<?> objectClass,
Field... fields)
Array alias vor #objectFieldOffset(Class, Field).
|
long[] |
objectFieldOffsets(Field... fields)
Array alias vor #objectFieldOffset(Field).
|
long |
reallocateMemory(long address,
long bytes) |
void |
set_boolean(long address,
boolean value) |
void |
set_boolean(Object instance,
long offset,
boolean value) |
void |
set_booleanInBytes(byte[] bytes,
int index,
boolean value) |
void |
set_byte(long address,
byte value) |
void |
set_byte(Object instance,
long offset,
byte value) |
void |
set_byteInBytes(byte[] bytes,
int index,
byte value) |
void |
set_char(long address,
char value) |
void |
set_char(Object instance,
long offset,
char value) |
void |
set_charInBytes(byte[] bytes,
int index,
char value) |
void |
set_double(long address,
double value) |
void |
set_double(Object instance,
long offset,
double value) |
void |
set_doubleInBytes(byte[] bytes,
int index,
double value) |
void |
set_float(long address,
float value) |
void |
set_float(Object instance,
long offset,
float value) |
void |
set_floatInBytes(byte[] bytes,
int index,
float value) |
void |
set_int(long address,
int value) |
void |
set_int(Object instance,
long offset,
int value) |
void |
set_intInBytes(byte[] bytes,
int index,
int value) |
void |
set_long(long address,
long value) |
void |
set_long(Object instance,
long offset,
long value) |
void |
set_longInBytes(byte[] bytes,
int index,
long value) |
void |
set_short(long address,
short value) |
void |
set_short(Object instance,
long offset,
short value) |
void |
set_shortInBytes(byte[] bytes,
int index,
short value) |
void |
setObject(Object instance,
long offset,
Object value) |
boolean |
systemDeallocateDirectByteBuffer(ByteBuffer directByteBuffer) |
MemoryAccessor |
toReversing() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitasByteArray, asByteArray, isReversing, objectFieldOffsets, objectFieldOffsetspublic static MemoryAccessorGeneric New()
public static MemoryAccessorGeneric New(DefaultInstantiator defaultInstantiator)
public static MemoryAccessorGeneric New(DirectBufferDeallocator directBufferDeallocator)
public static MemoryAccessorGeneric New(DefaultInstantiator defaultInstantiator, DirectBufferDeallocator directBufferDeallocator)
public final boolean systemDeallocateDirectByteBuffer(ByteBuffer directByteBuffer)
public final void guaranteeUsability()
MemoryAccessorguaranteeUsability in interface MemoryAccessorpublic final long getDirectByteBufferAddress(ByteBuffer directBuffer)
getDirectByteBufferAddress in interface MemoryAccessorpublic final boolean deallocateDirectByteBuffer(ByteBuffer directBuffer)
deallocateDirectByteBuffer in interface MemoryAccessorpublic final boolean isDirectByteBuffer(ByteBuffer byteBuffer)
isDirectByteBuffer in interface MemoryAccessorpublic final ByteBuffer guaranteeDirectByteBuffer(ByteBuffer directBuffer)
guaranteeDirectByteBuffer in interface MemoryAccessorpublic final long allocateMemory(long bytes)
allocateMemory in interface MemoryAccessorpublic final long reallocateMemory(long address,
long bytes)
reallocateMemory in interface MemoryAccessorpublic final void freeMemory(long address)
freeMemory in interface MemoryAccessorpublic ByteBuffer[] lookupChainNonNull(int chunkSizeIndex, int chainIndex)
public ByteBuffer[] lookupChain(int chunkSizeIndex)
public final void fillMemory(long targetAddress,
long length,
byte value)
fillMemory in interface MemoryAccessorpublic final byte get_byte(long address)
get_byte in interface MemoryAccessorpublic final boolean get_boolean(long address)
get_boolean in interface MemoryAccessorpublic final short get_short(long address)
get_short in interface MemoryAccessorpublic final char get_char(long address)
get_char in interface MemoryAccessorpublic final int get_int(long address)
get_int in interface MemoryAccessorpublic final float get_float(long address)
get_float in interface MemoryAccessorpublic final long get_long(long address)
get_long in interface MemoryAccessorpublic final double get_double(long address)
get_double in interface MemoryAccessorpublic final byte get_byte(Object instance, long offset)
get_byte in interface MemoryAccessorpublic final boolean get_boolean(Object instance, long offset)
get_boolean in interface MemoryAccessorpublic final short get_short(Object instance, long offset)
get_short in interface MemoryAccessorpublic final char get_char(Object instance, long offset)
get_char in interface MemoryAccessorpublic final int get_int(Object instance, long offset)
get_int in interface MemoryAccessorpublic final float get_float(Object instance, long offset)
get_float in interface MemoryAccessorpublic final long get_long(Object instance, long offset)
get_long in interface MemoryAccessorpublic final double get_double(Object instance, long offset)
get_double in interface MemoryAccessorpublic final Object getObject(Object instance, long offset)
getObject in interface MemoryAccessorpublic final void set_byte(long address,
byte value)
set_byte in interface MemoryAccessorpublic final void set_boolean(long address,
boolean value)
set_boolean in interface MemoryAccessorpublic final void set_short(long address,
short value)
set_short in interface MemoryAccessorpublic final void set_char(long address,
char value)
set_char in interface MemoryAccessorpublic final void set_int(long address,
int value)
set_int in interface MemoryAccessorpublic final void set_float(long address,
float value)
set_float in interface MemoryAccessorpublic final void set_long(long address,
long value)
set_long in interface MemoryAccessorpublic final void set_double(long address,
double value)
set_double in interface MemoryAccessorpublic final void set_byte(Object instance, long offset, byte value)
set_byte in interface MemoryAccessorpublic final void set_boolean(Object instance, long offset, boolean value)
set_boolean in interface MemoryAccessorpublic final void set_short(Object instance, long offset, short value)
set_short in interface MemoryAccessorpublic final void set_char(Object instance, long offset, char value)
set_char in interface MemoryAccessorpublic final void set_int(Object instance, long offset, int value)
set_int in interface MemoryAccessorpublic final void set_float(Object instance, long offset, float value)
set_float in interface MemoryAccessorpublic final void set_long(Object instance, long offset, long value)
set_long in interface MemoryAccessorpublic final void set_double(Object instance, long offset, double value)
set_double in interface MemoryAccessorpublic final void setObject(Object instance, long offset, Object value)
setObject in interface MemoryAccessorpublic final void set_byteInBytes(byte[] bytes,
int index,
byte value)
set_byteInBytes in interface MemoryAccessorpublic final void set_booleanInBytes(byte[] bytes,
int index,
boolean value)
set_booleanInBytes in interface MemoryAccessorpublic final void set_shortInBytes(byte[] bytes,
int index,
short value)
set_shortInBytes in interface MemoryAccessorpublic final void set_charInBytes(byte[] bytes,
int index,
char value)
set_charInBytes in interface MemoryAccessorpublic final void set_intInBytes(byte[] bytes,
int index,
int value)
set_intInBytes in interface MemoryAccessorpublic final void set_floatInBytes(byte[] bytes,
int index,
float value)
set_floatInBytes in interface MemoryAccessorpublic final void set_longInBytes(byte[] bytes,
int index,
long value)
set_longInBytes in interface MemoryAccessorpublic final void set_doubleInBytes(byte[] bytes,
int index,
double value)
set_doubleInBytes in interface MemoryAccessorpublic final void copyRange(long sourceAddress,
long targetAddress,
long length)
copyRange in interface MemoryAccessorpublic final void copyRangeToArray(long sourceAddress,
byte[] target)
copyRangeToArray in interface MemoryAccessorpublic final void copyRangeToArray(long sourceAddress,
boolean[] target)
copyRangeToArray in interface MemoryAccessorpublic final void copyRangeToArray(long sourceAddress,
short[] target)
copyRangeToArray in interface MemoryAccessorpublic final void copyRangeToArray(long sourceAddress,
char[] target)
copyRangeToArray in interface MemoryAccessorpublic final void copyRangeToArray(long sourceAddress,
int[] target)
copyRangeToArray in interface MemoryAccessorpublic final void copyRangeToArray(long sourceAddress,
float[] target)
copyRangeToArray in interface MemoryAccessorpublic final void copyRangeToArray(long sourceAddress,
long[] target)
copyRangeToArray in interface MemoryAccessorpublic final void copyRangeToArray(long sourceAddress,
double[] target)
copyRangeToArray in interface MemoryAccessorpublic final void copyArrayToAddress(byte[] array,
long targetAddress)
copyArrayToAddress in interface MemoryAccessorpublic final void copyArrayToAddress(boolean[] array,
long targetAddress)
copyArrayToAddress in interface MemoryAccessorpublic final void copyArrayToAddress(short[] array,
long targetAddress)
copyArrayToAddress in interface MemoryAccessorpublic final void copyArrayToAddress(char[] array,
long targetAddress)
copyArrayToAddress in interface MemoryAccessorpublic final void copyArrayToAddress(int[] array,
long targetAddress)
copyArrayToAddress in interface MemoryAccessorpublic final void copyArrayToAddress(float[] array,
long targetAddress)
copyArrayToAddress in interface MemoryAccessorpublic final void copyArrayToAddress(long[] array,
long targetAddress)
copyArrayToAddress in interface MemoryAccessorpublic final void copyArrayToAddress(double[] array,
long targetAddress)
copyArrayToAddress in interface MemoryAccessorpublic final long objectFieldOffset(Field field)
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.objectFieldOffset in interface MemoryAccessorfield - the Field whose abstract offset shall be determined.Field's abstract offset.public static final Class<?> determineMostSpecificDeclaringClass(Field[] fields)
public final long[] objectFieldOffsets(Field... fields)
objectFieldOffsets in interface MemoryAccessorfields - the fields to retrieve the offsets forpublic final long objectFieldOffset(Class<?> objectClass, Field field)
MemoryAccessorMemoryAccessor.objectFieldOffset(Field), but with the specific object class.objectFieldOffset in interface MemoryAccessorobjectClass - specific object classfield - the field to retrieve the offset forpublic final long[] objectFieldOffsets(Class<?> objectClass, Field... fields)
MemoryAccessorobjectFieldOffsets in interface MemoryAccessorobjectClass - specific object classfields - the fields to retrieve the offsets forpublic final void ensureClassInitialized(Class<?> c)
ensureClassInitialized in interface MemoryAccessorpublic final void ensureClassInitialized(Class<?> c, Iterable<Field> usedFields)
MemoryAccessorMemoryAccessor.ensureClassInitialized(Class).ensureClassInitialized in interface MemoryAccessorc - the class to ensure the initialization forusedFields - the used fieldspublic final <T> T instantiateBlank(Class<T> c) throws InstantiationRuntimeException
instantiateBlank in interface MemoryAccessorInstantiationRuntimeExceptionpublic final MemoryStatistics createHeapMemoryStatistics()
createHeapMemoryStatistics in interface MemoryAccessorpublic final MemoryStatistics createNonHeapMemoryStatistics()
createNonHeapMemoryStatistics in interface MemoryAccessorpublic final MemoryAccessor toReversing()
toReversing in interface MemoryAccessorCopyright © 2022 MicroStream Software. All rights reserved.