1 16 package org.apache.axis.wsdl.symbolTable; 17 18 import javax.xml.namespace.QName ; 19 import java.util.HashMap ; 20 import java.util.Iterator ; 21 import java.util.Map ; 22 23 30 public abstract class SymTabEntry { 31 32 34 35 protected QName qname; 36 37 40 41 protected String name; 42 43 45 46 private boolean isReferenced = false; 47 48 49 private HashMap dynamicVars = new HashMap (); 50 51 56 protected SymTabEntry(QName qname) { 57 this.qname = qname; 58 } 60 65 public final QName getQName() { 66 return qname; 67 } 69 75 public String getName() { 76 return name; 77 } 79 85 public void setName(String name) { 86 this.name = name; 87 } 89 94 public final boolean isReferenced() { 95 return isReferenced; 96 } 98 103 public final void setIsReferenced(boolean isReferenced) { 104 this.isReferenced = isReferenced; 105 } 107 119 public Object getDynamicVar(Object key) { 120 return dynamicVars.get(key); 121 } 123 129 public void setDynamicVar(Object key, Object value) { 130 dynamicVars.put(key, value); 131 } 133 138 public String toString() { 139 return toString(""); 140 } 142 148 protected String toString(String indent) { 149 150 String string = indent + "QName: " + qname + '\n' + indent 151 + "name: " + name + '\n' + indent 152 + "isReferenced? " + isReferenced + '\n'; 153 String prefix = indent + "dynamicVars: "; 154 Iterator entries = dynamicVars.entrySet().iterator(); 155 156 while (entries.hasNext()) { 157 Map.Entry entry = (Map.Entry ) entries.next(); 158 Object key = entry.getKey(); 159 160 string += prefix + key + " = " + entry.getValue() + '\n'; 161 prefix = indent + " "; 162 } 163 164 return string; 165 } } | Popular Tags |