public interface VirtualMachine
Modifier and Type | Method and Description |
---|---|
long |
addressOf(Object obj)
Returns the machine address of the given object.
|
int |
arrayBaseOffset(String arrayComponentKlass)
Returns the array base offset for an array of a given component type.
|
int |
arrayHeaderSize()
Returns the array header size.
|
int |
arrayIndexScale(String arrayComponentKlass)
Returns the array index scale for an array of a given component type.
|
String |
details()
Returns the informational details about the current VM mode
|
long |
fieldOffset(Field field)
Returns the field offset for a given field, starting from the object base.
|
boolean |
getBoolean(Object obj,
long offset)
Reads a boolean off the object at given offset.
|
byte |
getByte(Object obj,
long offset)
Reads a byte off the object at given offset.
|
char |
getChar(Object obj,
long offset)
Reads a char off the object at given offset.
|
double |
getDouble(Object obj,
long offset)
Reads a double off the object at given offset.
|
float |
getFloat(Object obj,
long offset)
Reads a float off the object at given offset.
|
int |
getInt(Object obj,
long offset)
Reads an int off the object at given offset.
|
long |
getLong(Object obj,
long offset)
Reads a long off the object at given offset.
|
Object |
getObject(Object obj,
long offset)
Reads an object off the object at given offset.
|
short |
getShort(Object obj,
long offset)
Reads a short off the object at given offset.
|
int |
objectAlignment()
Returns the object alignment.
|
int |
objectHeaderSize()
Returns the object header size.
|
long |
sizeOf(Object obj)
Returns the shallow size of the given object.
|
long |
sizeOfField(String klass)
Returns the size of a field holding the type.
|
long sizeOf(Object obj)
obj
- objectlong sizeOfField(String klass)
klass
- klasslong addressOf(Object obj)
obj
- objectlong fieldOffset(Field field)
field
- fieldint arrayBaseOffset(String arrayComponentKlass)
arrayComponentKlass
- component typeint arrayIndexScale(String arrayComponentKlass)
arrayComponentKlass
- component typeint objectAlignment()
int objectHeaderSize()
int arrayHeaderSize()
boolean getBoolean(Object obj, long offset)
obj
- instanceoffset
- offsetbyte getByte(Object obj, long offset)
obj
- instanceoffset
- offsetshort getShort(Object obj, long offset)
obj
- instanceoffset
- offsetchar getChar(Object obj, long offset)
obj
- instanceoffset
- offsetint getInt(Object obj, long offset)
obj
- instanceoffset
- offsetfloat getFloat(Object obj, long offset)
obj
- instanceoffset
- offsetlong getLong(Object obj, long offset)
obj
- instanceoffset
- offsetdouble getDouble(Object obj, long offset)
obj
- instanceoffset
- offsetObject getObject(Object obj, long offset)
obj
- instanceoffset
- offsetString details()
Copyright © 2020. All rights reserved.