1 55 56 package org.jboss.axis.wsdl.symbolTable; 57 58 import javax.xml.namespace.QName ; 59 import java.util.HashMap ; 60 import java.util.Iterator ; 61 import java.util.Map ; 62 63 70 public abstract class SymTabEntry 71 { 72 protected QName qname; 74 75 protected String name; 78 79 private boolean isReferenced = false; 81 82 private HashMap dynamicVars = new HashMap (); 83 84 87 protected SymTabEntry(QName qname) 88 { 89 this.qname = qname; 90 } 92 95 public final QName getQName() 96 { 97 return qname; 98 } 100 104 public String getName() 105 { 106 return name; 107 } 109 113 public void setName(String name) 114 { 115 this.name = name; 116 } 118 121 public final boolean isReferenced() 122 { 123 return isReferenced; 124 } 126 129 public final void setIsReferenced(boolean isReferenced) 130 { 131 this.isReferenced = isReferenced; 132 } 134 143 public Object getDynamicVar(Object key) 144 { 145 return dynamicVars.get(key); 146 } 148 public void setDynamicVar(Object key, Object value) 149 { 150 dynamicVars.put(key, value); 151 } 153 156 public String toString() 157 { 158 return toString(""); 159 } 161 164 protected String toString(String indent) 165 { 166 String string = 167 indent + "QName: " + qname + '\n' + 168 indent + "name: " + name + '\n' + 169 indent + "isReferenced? " + isReferenced + '\n'; 170 String prefix = indent + "dynamicVars: "; 171 Iterator entries = dynamicVars.entrySet().iterator(); 172 while (entries.hasNext()) 173 { 174 Map.Entry entry = (Map.Entry )entries.next(); 175 Object key = entry.getKey(); 176 string += prefix + key + " = " + entry.getValue() + '\n'; 177 prefix = indent + " "; 178 } 179 return string; 180 } } | Popular Tags |