junit.extensions.abbot
Class SizeOf

java.lang.Object
  extended by junit.extensions.abbot.SizeOf

public class SizeOf
extends Object


Nested Class Summary
static interface SizeOf.ObjectCreator
          For use with constructors which require arguments.
 
Constructor Summary
SizeOf()
           
 
Method Summary
static long getMemoryUse()
           
static void main(String[] args)
          Display the approximate size (in bytes) of the class given in the first argument.
static long sizeof(Class cls)
          Return the approximate size in bytes of an instance of the given class.
static long sizeof(SizeOf.ObjectCreator oc)
          Return the approximate size in bytes of the object returned by the given ObjectCreator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SizeOf

public SizeOf()
Method Detail

getMemoryUse

public static long getMemoryUse()

sizeof

public static long sizeof(SizeOf.ObjectCreator oc)
Return the approximate size in bytes of the object returned by the given ObjectCreator.


sizeof

public static long sizeof(Class cls)
Return the approximate size in bytes of an instance of the given class. The class must provide a no-args constructor.


main

public static void main(String[] args)
Display the approximate size (in bytes) of the class given in the first argument.



Copyright © 2002-2008 Timothy Wall. All Rights Reserved.
Abbot is hosted on

SourceForge