public class ClassHistogramVisitor extends Object implements ObjectVisitor
Modifier and Type | Class and Description |
---|---|
protected static class |
ClassHistogramVisitor.HistogramEntry
An entry for maps from class names to information about instances of those classes.
|
Modifier and Type | Field and Description |
---|---|
protected List<Class<?>> |
classList |
protected ClassHistogramVisitor.HistogramEntry[] |
entryArray |
Modifier | Constructor and Description |
---|---|
protected |
ClassHistogramVisitor()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
epilogue() |
static ClassHistogramVisitor |
factory()
Factory method.
|
protected ClassHistogramVisitor.HistogramEntry[] |
filterEntries(long minimumInstanceCount) |
protected void |
initializeClassList() |
void |
prologue() |
void |
reset()
Reset all the counters.
|
protected void |
toLog(Log log,
ClassHistogramVisitor.HistogramEntry entry) |
protected void |
toLog(Log log,
ClassHistogramVisitor.HistogramEntry[] entry) |
void |
toLogByCount(Log log,
long minimum)
Log all the entries, sorted by instance count.
|
void |
toLogByCount(Log log,
long minimum,
boolean increasing)
Log all the entries, by increasing or decreasing instance count.
|
void |
toLogByName(Log log,
long minimum)
Log all the entries, sorted by class name.
|
void |
toLogBySpace(Log log,
long minimum)
Log all the entries, sorted by occupied space.
|
void |
toLogBySpace(Log log,
long minimum,
boolean increasing)
Log all the entries, by increasing or decreasing occupied space.
|
boolean |
visitObject(Object o)
Visit an Object.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
visitObjectInline
protected final ClassHistogramVisitor.HistogramEntry[] entryArray
public static ClassHistogramVisitor factory()
public boolean visitObject(Object o)
ObjectVisitor
visitObject
in interface ObjectVisitor
o
- The Object to be visited.public void prologue()
public void epilogue()
public void reset()
public void toLogByName(Log log, long minimum)
public void toLogByCount(Log log, long minimum)
public void toLogByCount(Log log, long minimum, boolean increasing)
public void toLogBySpace(Log log, long minimum)
public void toLogBySpace(Log log, long minimum, boolean increasing)
protected void toLog(Log log, ClassHistogramVisitor.HistogramEntry[] entry)
protected void toLog(Log log, ClassHistogramVisitor.HistogramEntry entry)
protected ClassHistogramVisitor.HistogramEntry[] filterEntries(long minimumInstanceCount)
protected void initializeClassList()