01: /* Soot - a J*va Optimization Framework
02: * Copyright (C) 1997-1999 Raja Vallee-Rai
03: *
04: * This library is free software; you can redistribute it and/or
05: * modify it under the terms of the GNU Lesser General Public
06: * License as published by the Free Software Foundation; either
07: * version 2.1 of the License, or (at your option) any later version.
08: *
09: * This library is distributed in the hope that it will be useful,
10: * but WITHOUT ANY WARRANTY; without even the implied warranty of
11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12: * Lesser General Public License for more details.
13: *
14: * You should have received a copy of the GNU Lesser General Public
15: * License along with this library; if not, write to the
16: * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17: * Boston, MA 02111-1307, USA.
18: */
19:
20: package soot.toolkits.astmetrics;
21:
22: import polyglot.visit.PrettyPrinter;
23: import polyglot.ast.Node;
24: import polyglot.util.CodeWriter;
25:
26: /**
27: * @author Michael Batchelder
28: *
29: * Created on 12-Apr-2006
30: */
31: public class metricPrettyPrinter extends PrettyPrinter {
32:
33: ASTMetric astMetric;
34:
35: /**
36: *
37: */
38: public metricPrettyPrinter(ASTMetric astMetric) {
39: this .astMetric = astMetric;
40: }
41:
42: public void print(Node parent, Node child, CodeWriter w) {
43: astMetric.printAstMetric(child, w);
44: super.print(parent, child, w);
45: }
46: }
|