01: // This file is part of KeY - Integrated Deductive Software Design
02: // Copyright (C) 2001-2007 Universitaet Karlsruhe, Germany
03: // Universitaet Koblenz-Landau, Germany
04: // Chalmers University of Technology, Sweden
05: //
06: // The KeY system is protected by the GNU General Public License.
07: // See LICENSE.TXT for details.
08: //
09: // This file is part of KeY - Integrated Deductive Software Design
10: // Copyright (C) 2001-2004 Universitaet Karlsruhe, Germany
11: // Universitaet Koblenz-Landau, Germany
12: // Chalmers University of Technology, Sweden
13: //
14: // The KeY system is protected by the GNU General Public License.
15: // See LICENSE.TXT for details.
16: //
17: //
18:
19: package de.uka.ilkd.key.logic;
20:
21: import de.uka.ilkd.key.logic.op.IteratorOfProgramMethod;
22: import de.uka.ilkd.key.logic.op.ListOfProgramMethod;
23: import de.uka.ilkd.key.logic.op.ProgramMethod;
24:
25: public class MethodStackInfo implements NameCreationInfo {
26:
27: ListOfProgramMethod methods;
28:
29: public MethodStackInfo(ListOfProgramMethod methods) {
30: this .methods = methods;
31: }
32:
33: public String infoAsString() {
34: String result = "Method stack:\n";
35:
36: IteratorOfProgramMethod it = methods.iterator();
37: while (it.hasNext()) {
38: ProgramMethod m = it.next();
39: result += "- " + m.getProgramElementName().toString()
40: + "\n";
41: }
42:
43: if (result.length() < 1)
44: return "";
45:
46: result = result.substring(0, result.length() - 1);
47:
48: return result;
49: }
50:
51: }
|