|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object harpoon.Analysis.Quads.QuadCounter
public class QuadCounter
QuadCounter
is an harpoon.ClassFile.HCodeFactory
which counts the number of quads that have been convert
ed
thus far. count()
returns the current count.
Use in conjunction with a harpoon.ClassFile.CachingCodeFactory
to create an accurate count:
hcf = new CachingCodeFactory(new QuadCounter(hcf));
Constructor Summary | |
---|---|
QuadCounter(HCodeFactory hcf)
Creates a new QuadCounter with hcf as its
parent. |
Method Summary | |
---|---|
void |
clear(HMethod m)
Clears HMethod m from the cache. |
HCode |
convert(HMethod m)
Converts HMethod m into an
HCode and counts the number of Quad s
returned. |
long |
count()
Returns the current count of the number of Quad s
converted. |
String |
getCodeName()
Gets the code name of this HCodeFactory . |
String |
toString()
Print a textual representation of this QuadCounter . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public QuadCounter(HCodeFactory hcf)
QuadCounter
with hcf
as its
parent.
Method Detail |
---|
public HCode convert(HMethod m)
HMethod
m
into an
HCode
and counts the number of Quad
s
returned.
convert
in interface HCodeFactory
public String getCodeName()
HCodeFactory
.
getCodeName
in interface HCodeFactory
public void clear(HMethod m)
HMethod
m
from the cache.
Note: this does not remove the Quad
s from the total count.
clear
in interface HCodeFactory
public long count()
Quad
s
converted.
public String toString()
QuadCounter
.
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |