cyvis.core.metrics.sources
Class MetricSource.ProgressNotifier
java.lang.Object
cyvis.core.metrics.sources.MetricSource.ProgressNotifier
- Direct Known Subclasses:
- GUIProgressNotifier
- Enclosing class:
- MetricSource
public abstract static class MetricSource.ProgressNotifier
- extends Object
This is a callback mechanism by which other classes can track the
progress of a metrics collection run.
A notifier can track the total number of classes from which metrics are
to be extracted, which is initially 1 but is updated throughout the
run using incrementTotal(int)
. Progress made is indicated by
calls to progress(String)
, once for each class that metrics are
extracted from.
A metrics collection run is complete when the number of calls to
progress(String)
is equal to the sum of the arguments of all
calls to incrementTotal(int)
.
Field Summary |
protected int |
total
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
total
protected int total
MetricSource.ProgressNotifier
public MetricSource.ProgressNotifier()
incrementTotal
public void incrementTotal(int increment)
progress
public abstract void progress(String name)