|
SandMark version 3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sandmark.watermark.util.MethodMarker | +--sandmark.watermark.util.EveryBlockMarker
This implementation of MethodMarker takes a BasicBlockMarker and uses it to mark each basic block in a method. The BasicBlockMarker is also used to recognize embedded values from each basic block in the method.
Constructor Summary | |
EveryBlockMarker(BasicBlockMarker _marker)
Constructs a marker that marks basic blocks using the given BasicBlockMarker . |
Method Summary | |
void |
embed(MethodCFG m,
de.fub.bytecode.generic.ClassGen cg,
java.math.BigInteger value)
Attempts to encode the given value in the given method. |
int |
getCapacity(MethodCFG m)
Returns the number of bits that can be encoded into the given method. |
java.util.Iterator |
recognize(MethodCFG m)
Returns an Iterator over all
values found to be embedded in the
given method. |
Methods inherited from class sandmark.watermark.util.MethodMarker |
embed |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public EveryBlockMarker(BasicBlockMarker _marker)
BasicBlockMarker
.
_marker
- used to embed and recognize values in
each basic block of a methodMethod Detail |
public final void embed(MethodCFG m, de.fub.bytecode.generic.ClassGen cg, java.math.BigInteger value)
getCapacity()
,
an IllegalArgumentException
will be thrown.
embed
in class MethodMarker
m
- method to encode data incg
- class the method comes fromvalue
- data to encode
java.lang.IllegalArgumentException
- if value has too many bitsgetCapacity(sandmark.util.controlflowgraph.MethodCFG)
public final java.util.Iterator recognize(MethodCFG m)
Iterator
over all
values found to be embedded in the
given method. The returned
Iterator
will iterate over
all values found in at least one basic block of the
method, sorted in descending order according to
how many basic blocks each value was found in.
recognize
in class MethodMarker
m
- method to search for marks inpublic final int getCapacity(MethodCFG m)
BasicBlockMarker
.
getCapacity
in class MethodMarker
m
- method to report the bit capacity ofembed(sandmark.util.controlflowgraph.MethodCFG,
de.fub.bytecode.generic.ClassGen, java.math.BigInteger)
,
MethodMarker.embed(sandmark.util.controlflowgraph.MethodCFG,
de.fub.bytecode.generic.ClassGen, long)
,
BasicBlockMarker.getCapacity(sandmark.util.controlflowgraph.BasicBlock)
|
SandMark version 3.0 Wed Jan 29 10:30:05 MST 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |