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.
|
int |
getInt(Object obj,
long offset)
Reads the int 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()
int getInt(Object obj, long offset)
obj
- instanceoffset
- offsetString details()
Copyright © 2016. All Rights Reserved.