This commit was manufactured by cvs2svn to create tag 'buildscript'.
[IRC.git] /
1 package IR;
2
3 public class NameDescriptor extends Descriptor {
4   String identifier;
5   NameDescriptor nd;
6   public NameDescriptor(NameDescriptor nd, String id) {
7     super(nd.toString()+"."+id);
8     identifier=id;
9     this.nd=nd;
10   }
11
12   public NameDescriptor(String id) {
13     super(id);
14     identifier=id;
15     nd=null;
16   }
17
18   public String getIdentifier() {
19     return identifier;
20   }
21
22   public NameDescriptor getBase() {
23     return nd;
24   }
25
26   public String getRoot() {
27     if (nd==null)
28       return identifier;
29     else
30       return nd.getRoot();
31   }
32
33   public String toString() {
34     if (nd==null)
35       return identifier;
36     else
37       return nd+"."+identifier;
38   }
39
40 }