| java.lang.Object de.uka.ilkd.key.java.RecoderExample
RecoderExample | public class RecoderExample (Code) | | this class is an example how to work with a java AST. Therefore we
demonstrate the transformation of 'while (expr) { prg; }' to ' if
(expr) then { prg; } while (expr) { prg }'
|
createIfThen | public If createIfThen(Expression expr, JavaStatement prg)(Code) | | this method is used to create the part of the AST representing
an if-then statement.
Parameters: expr - the Expression that is the condition of the if part Parameters: prg - the JavaStatement after 'then' the If Statement with condition expr and 'then' part prg |
transform | public ExtList transform(While _while)(Code) | | transformates a "while(expr) {prg;}" to "if (exr) then {prg;}"
Parameters: While - the while-loop to transform the transformed AST |
transform | public StatementBlock transform(StatementBlock prg)(Code) | | transforms all while statements in a statement block to the wanted
"if-then-while" statement
Parameters: prg - the Statementblock to be transformed |
|
|