dk.brics.xact.analysis.soot
Class Translator
java.lang.Object
dk.brics.xact.analysis.soot.ExprAnswerVisitor<Object,Variable>
dk.brics.xact.analysis.soot.Translator
- All Implemented Interfaces:
- StmtSwitch, Switch
public class Translator
- extends ExprAnswerVisitor<Object,Variable>
- implements StmtSwitch
Method Summary |
Variable |
caseArrayRef(ArrayRef v,
Object question)
|
void |
caseAssignStmt(AssignStmt s)
|
void |
caseBreakpointStmt(BreakpointStmt s)
|
Variable |
caseCastExpr(CastExpr v,
Object question)
|
void |
caseEnterMonitorStmt(EnterMonitorStmt s)
|
void |
caseExitMonitorStmt(ExitMonitorStmt s)
|
void |
caseGotoStmt(GotoStmt s)
|
void |
caseIdentityStmt(IdentityStmt s)
|
void |
caseIfStmt(IfStmt s)
|
Variable |
caseInstanceFieldRef(InstanceFieldRef v,
Object question)
|
Variable |
caseInterfaceInvokeExpr(InterfaceInvokeExpr v,
Object question)
|
void |
caseInvokeStmt(InvokeStmt s)
|
Variable |
caseLocal(Local v,
Object question)
|
void |
caseLookupSwitchStmt(LookupSwitchStmt s)
|
Variable |
caseNewArrayExpr(NewArrayExpr v,
Object question)
|
Variable |
caseNewExpr(NewExpr v,
Object question)
|
Variable |
caseNewMultiArrayExpr(NewMultiArrayExpr v,
Object question)
|
void |
caseNopStmt(NopStmt s)
|
Variable |
caseNullConstant(NullConstant v,
Object question)
|
Variable |
caseParameterRef(ParameterRef v,
Object question)
|
void |
caseRetStmt(RetStmt s)
|
void |
caseReturnStmt(ReturnStmt s)
|
void |
caseReturnVoidStmt(ReturnVoidStmt s)
|
Variable |
caseSpecialInvokeExpr(SpecialInvokeExpr v,
Object question)
|
Variable |
caseStaticFieldRef(StaticFieldRef v,
Object question)
|
Variable |
caseStaticInvokeExpr(StaticInvokeExpr v,
Object question)
|
void |
caseTableSwitchStmt(TableSwitchStmt s)
|
Variable |
caseThisRef(ThisRef v,
Object question)
|
void |
caseThrowStmt(ThrowStmt s)
|
Variable |
caseVirtualInvokeExpr(VirtualInvokeExpr v,
Object question)
|
void |
defaultCase(Object s)
|
Variable |
defaultExpr(Object v,
Object question)
|
Variable |
getVarFromObjectExpByType(ValueBox b,
Type t)
|
Variable |
getVariableFromArrayExp(ValueBox b)
Returns a flow graph variable representing the possible XML values of the given Soot expression. |
Variable |
getVariableFromIterableExp(ValueBox b)
|
Variable |
getVariableFromObjectExp(ValueBox b)
|
boolean |
implementsToXMLable(SootClass sc)
|
void |
putVar(Value source)
Generates a VarStm. |
Variable |
translateExpr(Value expr)
|
StatementPair |
translateStmt(Stmt stmt)
|
Methods inherited from class dk.brics.xact.analysis.soot.ExprAnswerVisitor |
applyTo, caseAddExpr, caseAndExpr, caseCaughtExceptionRef, caseClassConstant, caseCmpExpr, caseCmpgExpr, caseCmplExpr, caseDivExpr, caseDoubleConstant, caseEqExpr, caseFloatConstant, caseGeExpr, caseGtExpr, caseInstanceOfExpr, caseIntConstant, caseLeExpr, caseLengthExpr, caseLongConstant, caseLtExpr, caseMulExpr, caseNeExpr, caseNegExpr, caseOrExpr, caseRemExpr, caseShlExpr, caseShrExpr, caseStringConstant, caseSubExpr, caseUshrExpr, caseXorExpr |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Translator
public Translator(TranslatorContext context,
Configuration config)
caseArrayRef
public Variable caseArrayRef(ArrayRef v,
Object question)
- Overrides:
caseArrayRef
in class ExprAnswerVisitor<Object,Variable>
caseAssignStmt
public void caseAssignStmt(AssignStmt s)
- Specified by:
caseAssignStmt
in interface StmtSwitch
caseBreakpointStmt
public void caseBreakpointStmt(BreakpointStmt s)
- Specified by:
caseBreakpointStmt
in interface StmtSwitch
caseCastExpr
public Variable caseCastExpr(CastExpr v,
Object question)
- Overrides:
caseCastExpr
in class ExprAnswerVisitor<Object,Variable>
caseEnterMonitorStmt
public void caseEnterMonitorStmt(EnterMonitorStmt s)
- Specified by:
caseEnterMonitorStmt
in interface StmtSwitch
caseExitMonitorStmt
public void caseExitMonitorStmt(ExitMonitorStmt s)
- Specified by:
caseExitMonitorStmt
in interface StmtSwitch
caseGotoStmt
public void caseGotoStmt(GotoStmt s)
- Specified by:
caseGotoStmt
in interface StmtSwitch
caseIdentityStmt
public void caseIdentityStmt(IdentityStmt s)
- Specified by:
caseIdentityStmt
in interface StmtSwitch
caseIfStmt
public void caseIfStmt(IfStmt s)
- Specified by:
caseIfStmt
in interface StmtSwitch
caseInstanceFieldRef
public Variable caseInstanceFieldRef(InstanceFieldRef v,
Object question)
- Overrides:
caseInstanceFieldRef
in class ExprAnswerVisitor<Object,Variable>
caseInterfaceInvokeExpr
public Variable caseInterfaceInvokeExpr(InterfaceInvokeExpr v,
Object question)
- Overrides:
caseInterfaceInvokeExpr
in class ExprAnswerVisitor<Object,Variable>
caseInvokeStmt
public void caseInvokeStmt(InvokeStmt s)
- Specified by:
caseInvokeStmt
in interface StmtSwitch
caseLocal
public Variable caseLocal(Local v,
Object question)
- Overrides:
caseLocal
in class ExprAnswerVisitor<Object,Variable>
caseLookupSwitchStmt
public void caseLookupSwitchStmt(LookupSwitchStmt s)
- Specified by:
caseLookupSwitchStmt
in interface StmtSwitch
caseNewArrayExpr
public Variable caseNewArrayExpr(NewArrayExpr v,
Object question)
- Overrides:
caseNewArrayExpr
in class ExprAnswerVisitor<Object,Variable>
caseNewExpr
public Variable caseNewExpr(NewExpr v,
Object question)
- Overrides:
caseNewExpr
in class ExprAnswerVisitor<Object,Variable>
caseNewMultiArrayExpr
public Variable caseNewMultiArrayExpr(NewMultiArrayExpr v,
Object question)
- Overrides:
caseNewMultiArrayExpr
in class ExprAnswerVisitor<Object,Variable>
caseNopStmt
public void caseNopStmt(NopStmt s)
- Specified by:
caseNopStmt
in interface StmtSwitch
caseNullConstant
public Variable caseNullConstant(NullConstant v,
Object question)
- Overrides:
caseNullConstant
in class ExprAnswerVisitor<Object,Variable>
caseParameterRef
public Variable caseParameterRef(ParameterRef v,
Object question)
- Overrides:
caseParameterRef
in class ExprAnswerVisitor<Object,Variable>
caseRetStmt
public void caseRetStmt(RetStmt s)
- Specified by:
caseRetStmt
in interface StmtSwitch
caseReturnStmt
public void caseReturnStmt(ReturnStmt s)
- Specified by:
caseReturnStmt
in interface StmtSwitch
caseReturnVoidStmt
public void caseReturnVoidStmt(ReturnVoidStmt s)
- Specified by:
caseReturnVoidStmt
in interface StmtSwitch
caseSpecialInvokeExpr
public Variable caseSpecialInvokeExpr(SpecialInvokeExpr v,
Object question)
- Overrides:
caseSpecialInvokeExpr
in class ExprAnswerVisitor<Object,Variable>
caseStaticFieldRef
public Variable caseStaticFieldRef(StaticFieldRef v,
Object question)
- Overrides:
caseStaticFieldRef
in class ExprAnswerVisitor<Object,Variable>
caseStaticInvokeExpr
public Variable caseStaticInvokeExpr(StaticInvokeExpr v,
Object question)
- Overrides:
caseStaticInvokeExpr
in class ExprAnswerVisitor<Object,Variable>
caseTableSwitchStmt
public void caseTableSwitchStmt(TableSwitchStmt s)
- Specified by:
caseTableSwitchStmt
in interface StmtSwitch
caseThisRef
public Variable caseThisRef(ThisRef v,
Object question)
- Overrides:
caseThisRef
in class ExprAnswerVisitor<Object,Variable>
caseThrowStmt
public void caseThrowStmt(ThrowStmt s)
- Specified by:
caseThrowStmt
in interface StmtSwitch
caseVirtualInvokeExpr
public Variable caseVirtualInvokeExpr(VirtualInvokeExpr v,
Object question)
- Overrides:
caseVirtualInvokeExpr
in class ExprAnswerVisitor<Object,Variable>
defaultCase
public void defaultCase(Object s)
- Specified by:
defaultCase
in interface StmtSwitch
defaultExpr
public Variable defaultExpr(Object v,
Object question)
- Overrides:
defaultExpr
in class ExprAnswerVisitor<Object,Variable>
getVarFromObjectExpByType
public Variable getVarFromObjectExpByType(ValueBox b,
Type t)
getVariableFromArrayExp
public Variable getVariableFromArrayExp(ValueBox b)
- Returns a flow graph variable representing the possible XML values of the given Soot expression.
For every subclass of the declared class type of the expression:
if the subclass is an XML type, an assignment is added from the value to the new variable;
if the subclass implements
ToXMLable
, an assignment is added from
a call to toXML
on the value to the new variable.
Returns null is the input type is NullType
.
getVariableFromIterableExp
public Variable getVariableFromIterableExp(ValueBox b)
getVariableFromObjectExp
public Variable getVariableFromObjectExp(ValueBox b)
implementsToXMLable
public boolean implementsToXMLable(SootClass sc)
putVar
public void putVar(Value source)
- Generates a VarStm.
translateExpr
public Variable translateExpr(Value expr)
translateStmt
public StatementPair translateStmt(Stmt stmt)
Copyright © 2005-2011 Aarhus University.