EMMA Coverage Report (generated Sat Dec 08 18:10:06 GMT 2007)
[all classes][uk.co.zonetora.fj.ast.node]

COVERAGE SUMMARY FOR SOURCE FILE [Node.java]

nameclass, %method, %block, %line, %
Node.java100% (1/1)38%  (3/8)14%  (10/73)19%  (4/21)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class Node100% (1/1)38%  (3/8)14%  (10/73)19%  (4/21)
cloneList (List): List 0%   (0/1)0%   (0/20)0%   (0/4)
cloneNode (Node): Node 0%   (0/1)0%   (0/8)0%   (0/3)
replaceBy (Node): void 0%   (0/1)0%   (0/9)0%   (0/3)
toString (List): String 0%   (0/1)0%   (0/19)0%   (0/4)
toString (Node): String 0%   (0/1)0%   (0/7)0%   (0/3)
Node (): void 100% (1/1)100% (3/3)100% (1/1)
parent (): Node 100% (1/1)100% (3/3)100% (1/1)
parent (Node): void 100% (1/1)100% (4/4)100% (2/2)

1/* This file was generated by SableCC (http://www.sablecc.org/). */
2 
3package uk.co.zonetora.fj.ast.node;
4 
5import java.util.*;
6import uk.co.zonetora.fj.ast.analysis.*;
7 
8public abstract class Node implements Switchable, Cloneable
9{
10    private Node parent;
11 
12    public abstract Object clone();
13 
14    public Node parent()
15    {
16        return parent;
17    }
18 
19    void parent(Node parent)
20    {
21        this.parent = parent;
22    }
23 
24    abstract void removeChild(Node child);
25    abstract void replaceChild(Node oldChild, Node newChild);
26 
27    public void replaceBy(Node node)
28    {
29        if(parent != null)
30        {
31            parent.replaceChild(this, node);
32        }
33    }
34 
35    protected String toString(Node node)
36    {
37        if(node != null)
38        {
39            return node.toString();
40        }
41 
42        return "";
43    }
44 
45    protected String toString(List list)
46    {
47        StringBuffer s = new StringBuffer();
48 
49        for(Iterator i = list.iterator(); i.hasNext();)
50        {
51            s.append(i.next());
52        }
53 
54        return s.toString();
55    }
56 
57    protected Node cloneNode(Node node)
58    {
59        if(node != null)
60        {
61            return (Node) node.clone();
62        }
63 
64        return null;
65    }
66 
67    protected List cloneList(List list)
68    {
69        List clone = new LinkedList();
70 
71        for(Iterator i = list.iterator(); i.hasNext();)
72        {
73            clone.add(((Node) i.next()).clone());
74        }
75 
76        return clone;
77    }
78}

[all classes][uk.co.zonetora.fj.ast.node]
EMMA 2.0.5312 (C) Vladimir Roubtsov