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 [AProg.java]

nameclass, %method, %block, %line, %
AProg.java100% (2/2)46%  (6/13)40%  (72/178)38%  (17.3/46)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class AProg100% (1/1)30%  (3/10)24%  (33/139)22%  (8.3/37)
AProg (): void 0%   (0/1)0%   (0/13)0%   (0/3)
AProg (List): void 0%   (0/1)0%   (0/21)0%   (0/5)
clone (): Object 0%   (0/1)0%   (0/8)0%   (0/2)
removeChild (Node): void 0%   (0/1)0%   (0/7)0%   (0/3)
replaceChild (Node, Node): void 0%   (0/1)0%   (0/28)0%   (0/10)
setClassDecl (List): void 0%   (0/1)0%   (0/9)0%   (0/3)
toString (): String 0%   (0/1)0%   (0/10)0%   (0/2)
AProg (XPClassDecl): void 100% (1/1)71%  (25/35)75%  (6/8)
apply (Switch): void 100% (1/1)100% (5/5)100% (2/2)
getClassDecl (): LinkedList 100% (1/1)100% (3/3)100% (1/1)
     
class AProg$ClassDecl_Cast100% (1/1)100% (3/3)100% (39/39)100% (9/9)
AProg$ClassDecl_Cast (AProg): void 100% (1/1)100% (6/6)100% (1/1)
AProg$ClassDecl_Cast (AProg, AProg$ClassDecl_Cast): void 100% (1/1)100% (4/4)100% (1/1)
cast (Object): Object 100% (1/1)100% (29/29)100% (8/8)

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 final class AProg extends PProg
9{
10    private final LinkedList _classDecl_ = new TypedLinkedList(new ClassDecl_Cast());
11 
12    public AProg()
13    {
14    }
15 
16    public AProg(
17        List _classDecl_)
18    {
19        {
20            this._classDecl_.clear();
21            this._classDecl_.addAll(_classDecl_);
22        }
23 
24    }
25 
26    public AProg(
27        XPClassDecl _classDecl_)
28    {
29        if(_classDecl_ != null)
30        {
31            while(_classDecl_ instanceof X1PClassDecl)
32            {
33                this._classDecl_.addFirst(((X1PClassDecl) _classDecl_).getPClassDecl());
34                _classDecl_ = ((X1PClassDecl) _classDecl_).getXPClassDecl();
35            }
36            this._classDecl_.addFirst(((X2PClassDecl) _classDecl_).getPClassDecl());
37        }
38 
39    }
40    public Object clone()
41    {
42        return new AProg(
43            cloneList(_classDecl_));
44    }
45 
46    public void apply(Switch sw)
47    {
48        ((Analysis) sw).caseAProg(this);
49    }
50 
51    public LinkedList getClassDecl()
52    {
53        return _classDecl_;
54    }
55 
56    public void setClassDecl(List list)
57    {
58        _classDecl_.clear();
59        _classDecl_.addAll(list);
60    }
61 
62    public String toString()
63    {
64        return ""
65            + toString(_classDecl_);
66    }
67 
68    void removeChild(Node child)
69    {
70        if(_classDecl_.remove(child))
71        {
72            return;
73        }
74 
75    }
76 
77    void replaceChild(Node oldChild, Node newChild)
78    {
79        for(ListIterator i = _classDecl_.listIterator(); i.hasNext();)
80        {
81            if(i.next() == oldChild)
82            {
83                if(newChild != null)
84                {
85                    i.set(newChild);
86                    oldChild.parent(null);
87                    return;
88                }
89 
90                i.remove();
91                oldChild.parent(null);
92                return;
93            }
94        }
95 
96    }
97 
98    private class ClassDecl_Cast implements Cast
99    {
100        public Object cast(Object o)
101        {
102            PClassDecl node = (PClassDecl) o;
103 
104            if((node.parent() != null) &&
105                (node.parent() != AProg.this))
106            {
107                node.parent().removeChild(node);
108            }
109 
110            if((node.parent() == null) ||
111                (node.parent() != AProg.this))
112            {
113                node.parent(AProg.this);
114            }
115 
116            return node;
117        }
118    }
119}

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