|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectharpoon.Analysis.Transformation.MethodMutator<HCE>
public abstract class MethodMutator<HCE extends HCodeElement>
MethodMutator
makes it easier to implement simple
method code mutations. It is meant to be subclassed. In your
subclass, you will likely want to override mutateHCode()
to effect the change.
Constructor Summary | |
---|---|
MethodMutator(HCodeFactory parent)
Creates a MethodMutator . |
Method Summary | |
---|---|
protected HCodeAndMaps<HCE> |
cloneHCode(HCode<HCE> hc,
HMethod newmethod)
Override this method if you do not want the mutatable HCode to be a straight clone of the original HCode: for example, if the input HCodes were QuadSSI and you wanted to
clone them into QuadRSSI s before mutating. |
HCodeFactory |
codeFactory()
Returns a HCodeFactory containing representations for
the methods altered by the MethodMutator . |
protected String |
mutateCodeName(String codeName)
Override this method to change the codename which this MethodMutator 's codefactory reports. |
protected HCode<HCE> |
mutateHCode(HCodeAndMaps<HCE> input)
Override this method to effect transformations on split methods. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MethodMutator(HCodeFactory parent)
MethodMutator
.
Method Detail |
---|
protected HCode<HCE> mutateHCode(HCodeAndMaps<HCE> input)
protected String mutateCodeName(String codeName)
MethodMutator
's codefactory reports.
protected HCodeAndMaps<HCE> cloneHCode(HCode<HCE> hc, HMethod newmethod) throws CloneNotSupportedException
QuadSSI
and you wanted to
clone them into QuadRSSI
s before mutating.
By default, this method returns hc.clone(newmethod)
.
CloneNotSupportedException
public HCodeFactory codeFactory()
HCodeFactory
containing representations for
the methods altered by the MethodMutator
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |