1 18 19 package org.objectweb.jac.ide; 20 21 import java.util.List ; 22 import java.util.Vector ; 23 24 26 27 public abstract class ModelElement{ 28 29 31 public ModelElement(){ 32 } 33 34 36 public ModelElement(String name){ 37 this.name = name; 38 } 39 40 String name = ""; 41 42 43 public void setName(String name){ 44 this.name = name; 45 } 46 47 50 51 public String getFullName(){ 52 return getName(); 53 } 54 55 56 public String getName(){ 57 return name; 58 } 59 60 63 public String getGenerationName() { 64 return getName(); 65 } 66 67 70 public String getGenerationFullName() { 71 return getFullName(); 72 } 73 74 78 79 public Type getType(){ 80 return Projects.types.resolveType("void", ""); 81 } 82 83 List endingLinks = new Vector (); 84 89 public List getEndingLinks(){ 90 return endingLinks; 91 } 92 93 public void setEndingLinks(List l) { 94 endingLinks = l; 95 } 96 97 public void addEndingLink(Role l) { 98 endingLinks.add(l); 99 } 100 101 public void removeEndingLink(Role l) { 102 endingLinks.remove(l); 103 } 104 105 List links = new Vector (); 106 111 public List getLinks() { 112 return links; 113 } 114 115 public void setLinks(List l) { 116 links = l; 117 } 118 119 public void addLink(Role l) { 120 links.add(l); 121 } 122 123 public void removeLink(Role l) { 124 links.remove(l); 125 } 126 127 String description; 128 129 133 public String getDescription(){ 134 return description; 135 } 136 137 141 public void setDescription(String v){ 142 this.description=v; 143 144 } 145 146 private List configItems = new Vector (); 147 148 152 public void addConfigItem(ConfigItem config){ 153 configItems.add(config); 154 } 155 156 160 public void remove(ConfigItem config){ 161 configItems.remove(config); 162 } 163 164 public List getConfigItems(){ 165 return configItems; 166 } 167 } 168 | Popular Tags |