This non-instantiable class presents an API for object sizing
as described in the
article.
See individual methods for details.
This implementation is J2SE 1.4+ only. You would need to code your own
identity hashmap to port this to earlier Java versions.
Security: this implementation uses AccessController.doPrivileged() so it
could be granted privileges to access non-public class fields separately from
your main application code. The minimum set of permissions necessary for this
class to function correctly follows:
permission java.lang.RuntimePermission "accessDeclaredMembers";
permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
author: (C) Vlad author: Roubtsov, 2003 |