org.objectweb.jac.aspects.tracing
Class Counter

java.lang.Object
  extended byorg.objectweb.jac.aspects.tracing.Counter

public class Counter
extends Object

The functional part of the counting aspect: a counter object.

This component is used by the SimpleCountingWrapper and the OptimizedCountingWrapper to count the invocations performed on the counted methods.

See Also:
SimpleCountingWrapper, OptimizedCountingWrapper

Constructor Summary
Counter()
           
 
Method Summary
 int get()
          Gets the counter value.
 void incr(int value)
          Increments the counter with a given value.
 void printCounter()
          Print the counter in System.out.
 void set(int value)
          Sets the counter value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Counter

public Counter()
Method Detail

incr

public void incr(int value)
Increments the counter with a given value.


set

public void set(int value)
Sets the counter value.

Parameters:
value - the new counter value
See Also:
get(), incr(int)

get

public int get()
Gets the counter value.

Returns:
the counter value
See Also:
set(int), incr(int)

printCounter

public void printCounter()
Print the counter in System.out.