Java 类soot.jimple.RetStmt 实例源码
项目:bixie
文件:SootStmtSwitch.java
@Override
public void caseRetStmt(RetStmt arg0) {
injectLabelStatements(arg0);
Log.error("This is deprecated: " + arg0.toString());
throw new RuntimeException(
"caseRetStmt is not implemented. Contact developers!");
}
项目:jar2bpl
文件:SootStmtSwitch.java
@Override
public void caseRetStmt(RetStmt arg0) {
injectLabelStatements(arg0);
Log.error("This is deprecated: " + arg0.toString());
throw new RuntimeException(
"caseRetStmt is not implemented. Contact developers!");
}
项目:FuzzDroid
文件:JimpleStmtVisitorImpl.java
@Override
public void caseRetStmt(RetStmt stmt) {
throw new RuntimeException("todo");
}
项目:JAADAS
文件:StmtTemplatePrinter.java
public void caseRetStmt(RetStmt stmt) {
String varName = printValueAssignment(stmt.getStmtAddress(), "stmtAddress");
printStmt(stmt,varName);
}
项目:JAADAS
文件:StmtVisitor.java
@Override
public void caseRetStmt(RetStmt stmt) {
throw new Error("ret statements are deprecated!");
}
项目:JAADAS
文件:StructuredAnalysis.java
/**
* Whenever a statement has to be processed the first step is to invoke this
* method. This is to remove the tedious work of adding code to deal with
* abrupt control flow from the programmer of the analysis. The method
* invokes the processStatement method for all other statements
*
* A programmer can decide to override this method if they want to do
* something specific
*/
public DavaFlowSet processAbruptStatements(Stmt s, DavaFlowSet input) {
if (s instanceof ReturnStmt || s instanceof RetStmt || s instanceof ReturnVoidStmt) {
// dont need to remember this path
return NOPATH;
} else if (s instanceof DAbruptStmt) {
DAbruptStmt abStmt = (DAbruptStmt) s;
// see if its a break or continue
if (!(abStmt.is_Continue() || abStmt.is_Break())) {
// DAbruptStmt is of only two kinds
throw new RuntimeException("Found a DAbruptStmt which is neither break nor continue!!");
}
DavaFlowSet temp = NOPATH;
SETNodeLabel nodeLabel = abStmt.getLabel();
// System.out.println("here");
if (nodeLabel != null && nodeLabel.toString() != null) {
// explicit abrupt stmt
if (abStmt.is_Continue())
temp.addToContinueList(nodeLabel.toString(), input);
else if (abStmt.is_Break())
temp.addToBreakList(nodeLabel.toString(), input);
else
throw new RuntimeException("Found abruptstmt which is neither break nor continue");
} else {
// found implicit break/continue
if (abStmt.is_Continue())
temp.addToImplicitContinues(abStmt, input);
else if (abStmt.is_Break())
temp.addToImplicitBreaks(abStmt, input);
else
throw new RuntimeException("Found abruptstmt which is neither break nor continue");
}
return temp;
} else {
/**************************************************************/
/****** ALL OTHER STATEMENTS HANDLED BY PROGRAMMER **************/
/**************************************************************/
return processStatement(s, input);
}
}
项目:JAADAS
文件:UnreachableCodeFinder.java
@Override
public DavaFlowSet processAbruptStatements(Stmt s, DavaFlowSet input){
if(DEBUG) System.out.println("processing stmt "+s);
if(s instanceof ReturnStmt || s instanceof RetStmt || s instanceof ReturnVoidStmt){
//dont need to remember this path
UnreachableCodeFlowSet toReturn = new UnreachableCodeFlowSet();
toReturn.add(new Boolean(false));
toReturn.copyInternalDataFrom(input);
//false indicates NOPATH
if(DEBUG) System.out.println("\tstmt is a return stmt. Hence sending forward false");
return toReturn;
}
else if(s instanceof DAbruptStmt){
DAbruptStmt abStmt = (DAbruptStmt)s;
//see if its a break or continue
if(!(abStmt.is_Continue()|| abStmt.is_Break())){
//DAbruptStmt is of only two kinds
throw new RuntimeException("Found a DAbruptStmt which is neither break nor continue!!");
}
DavaFlowSet temp = new UnreachableCodeFlowSet();
SETNodeLabel nodeLabel = abStmt.getLabel();
// notice we ignore continues for this analysis
if (abStmt.is_Break()){
if(nodeLabel != null && nodeLabel.toString() != null){
//explicit break stmt
temp.addToBreakList(nodeLabel.toString(),input);
}
else{
//found implicit break
temp.addToImplicitBreaks(abStmt,input);
}
}
temp.add(new Boolean(false));
temp.copyInternalDataFrom(input);
if(DEBUG) System.out.println("\tstmt is an abrupt stmt. Hence sending forward false");
return temp;
}
else{
if(DEBUG) System.out.println("\tstmt is not an abrupt stmt.");
return processStatement(s,input);
}
}
项目:JAADAS
文件:UnitThrowAnalysis.java
@Override
public void caseRetStmt(RetStmt s) {
// Soot should never produce any RetStmt, since
// it implements jsr with gotos.
}
项目:jgs
文件:SecurityConstraintStmtSwitch.java
@Override
public void caseRetStmt(RetStmt stmt) {
throwNotImplementedException(stmt.getClass(), stmt.toString());
}
项目:jgs
文件:AnnotationStmtSwitch.java
@Override
public void caseRetStmt(RetStmt stmt) {
logger.fine("\n > > > Ret statement identified < < <");
valueSwitch.callingStmt = stmt;
throw new NotSupportedStmtException("RetStmt");
}
项目:jgs
文件:AnnotationStmtSwitch.java
@Override
public void caseRetStmt(RetStmt stmt) {
logger.fine("\n > > > Ret statement identified < < <");
throw new NotSupportedStmtException("RetStmt");
}
项目:jgs
文件:SecurityLevelStmtSwitch.java
/**
* Method, which should process the given statement of type {@link RetStmt},
* but is not implemented in the current version of this method. If method
* will be called an exception is thrown.
*
* @param stmt
* Statement that should be processed to check for security
* violations.
* @see soot.jimple.StmtSwitch#caseRetStmt(soot.jimple.RetStmt)
* @throws UnimplementedSwitchException
* Method throws always this exception, because the method is
* not implemented.
*/
@Override
public void caseRetStmt(RetStmt stmt) {
throw new SwitchException(getMsg("exception.analysis.switch.not_implemented",
stmt.toString(),
getSourceLine(),
stmt.getClass().getSimpleName(),
this.getClass().getSimpleName()));
}
项目:jgs
文件:AnnotationStmtSwitch.java
/**
* DOC
*
* @see soot.jimple.StmtSwitch#caseRetStmt(soot.jimple.RetStmt)
*/
@Override
public void caseRetStmt(RetStmt stmt) {
}