|
JAC project AOPSYS CEDRIC & LIP6 labs |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.objectweb.jac.core.Wrapper | +--org.objectweb.jac.aspects.tracing.SimpleCountingWrapper
This simple counter must wrap the methods of which calls have to be counted.
In some cases, optimizations can be achieved by grouping
counts. See OptimizedCountingWrapper
.
OptimizedCountingWrapper
,
Serialized FormField Summary |
Fields inherited from class org.objectweb.jac.core.Wrapper |
ac |
Constructor Summary | |
SimpleCountingWrapper(AspectComponent ac,
Counter counter)
Creates a new wrapper that uses the given counter. |
Method Summary | |
int |
getCounter()
Role method: get the counter value. |
Object |
incr(Interaction interaction)
This wrapping method increments the counter when the wrapped method is called. |
void |
printCounter()
Prints the counter in System.out . |
void |
setCounter(int value)
Role method: set the counter value. |
Methods inherited from class org.objectweb.jac.core.Wrapper |
attr, attrdef, defines, getAspectComponent, getAspectComponentName, getExceptionHandlers, proceed, setAspectComponent, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public SimpleCountingWrapper(AspectComponent ac, Counter counter)
counter
- the counterMethod Detail |
public Object incr(Interaction interaction)
public void setCounter(int value)
value
- the new counter valuegetCounter()
,
incr(Interaction)
public int getCounter()
setCounter(int)
,
incr(Interaction)
public void printCounter()
System.out
.
|
Contact JAC development team: Renaud Pawlak Lionel Seinturier Laurent Martelli |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |