|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjist.swans.misc.Sizeof
public class Sizeof
Compute the static or dynamic size of a type or object.
| Field Summary | |
|---|---|
private static int |
SIZE_REFERENCE
Size of a pointer. |
| Constructor Summary | |
|---|---|
Sizeof()
|
|
| Method Summary | |
|---|---|
private static int |
array(java.lang.Object obj)
Return (dynamic) size of an array. |
static int |
inst(boolean b)
Return (dynamic) size of primitive. |
static int |
inst(byte b)
Return (dynamic) size of primitive. |
static int |
inst(char c)
Return (dynamic) size of primitive. |
static int |
inst(double d)
Return (dynamic) size of primitive. |
static int |
inst(float f)
Return (dynamic) size of primitive. |
static int |
inst(int i)
Return (dynamic) size of primitive. |
static int |
inst(long l)
Return (dynamic) size of primitive. |
static int |
inst(java.lang.Object obj)
Return (dynamic) size of object instance. |
static int |
inst(short s)
Return (dynamic) size of primitive. |
private static int |
primitive(java.lang.Class type)
Return static size of primitive type. |
static int |
type(java.lang.Class type)
Return static size of non-primitive type (a class/structure). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final int SIZE_REFERENCE
| Constructor Detail |
|---|
public Sizeof()
| Method Detail |
|---|
public static int inst(boolean b)
b - boolean
public static int inst(byte b)
b - byte
public static int inst(char c)
c - char
public static int inst(short s)
s - short
public static int inst(int i)
i - int
public static int inst(long l)
l - long
public static int inst(float f)
f - float
public static int inst(double d)
d - double
public static int inst(java.lang.Object obj)
obj - object to size
private static int array(java.lang.Object obj)
obj - array to compute size
public static int type(java.lang.Class type)
type - class or structure to compute size
private static int primitive(java.lang.Class type)
type - class of primitive type
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||