Skip to content

Commit

Permalink
Makes dava to print ClassConst as pkg.ClassName.class
Browse files Browse the repository at this point in the history
Right now, it uses the same format as in Jimple:
  class "pkg.ClassName"
which makes the generated .java code uncompilable.
  • Loading branch information
dacongy committed Apr 30, 2014
1 parent 7e47521 commit 37a93bc
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/soot/dava/DavaUnitPrinter.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,15 @@ public void unitRef( Unit u, boolean branchTarget ) {
throw new RuntimeException( "Dava doesn't have unit references!" );
}





@Override
public void constant( Constant c ) {
if (c instanceof ClassConstant) {
handleIndent();
output.append(((ClassConstant)c).value + ".class");
} else {
super.constant(c);
}
}

public void addNot() {
output.append(" !");
Expand Down

0 comments on commit 37a93bc

Please sign in to comment.