|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectharpoon.Analysis.Quads.QuadCounter
public class QuadCounter
QuadCounter is an harpoon.ClassFile.HCodeFactory
which counts the number of quads that have been converted
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 Quads
returned. |
long |
count()
Returns the current count of the number of Quads
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 Quads
returned.
convert in interface HCodeFactorypublic String getCodeName()
HCodeFactory.
getCodeName in interface HCodeFactorypublic void clear(HMethod m)
HMethod m from the cache.
Note: this does not remove the Quads from the total count.
clear in interface HCodeFactorypublic long count()
Quads
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 | ||||||||