1 16 19 package com.sun.org.apache.xpath.internal; 20 21 import com.sun.org.apache.xml.internal.utils.QName; 22 import com.sun.org.apache.xpath.internal.objects.XObject; 23 24 30 public class Arg 31 { 32 33 38 private QName m_qname; 39 40 45 public final QName getQName() 46 { 47 return m_qname; 48 } 49 50 55 public final void setQName(QName name) 56 { 57 m_qname = name; 58 } 59 60 64 private XObject m_val; 65 66 72 public final XObject getVal() 73 { 74 return m_val; 75 } 76 77 83 public final void setVal(XObject val) 84 { 85 m_val = val; 86 } 87 88 92 public void detach() 93 { 94 if(null != m_val) 95 { 96 m_val.allowDetachToRelease(true); 97 m_val.detach(); 98 } 99 } 100 101 102 106 private String m_expression; 107 108 115 public String getExpression() 116 { 117 return m_expression; 118 } 119 120 127 public void setExpression(String expr) 128 { 129 m_expression = expr; 130 } 131 132 136 private boolean m_isFromWithParam; 137 138 142 public boolean isFromWithParam() 143 { 144 return m_isFromWithParam; 145 } 146 147 154 private boolean m_isVisible; 155 156 159 public boolean isVisible() 160 { 161 return m_isVisible; 162 } 163 164 167 public void setIsVisible(boolean b) 168 { 169 m_isVisible = b; 170 } 171 172 177 public Arg() 178 { 179 180 m_qname = new QName(""); 181 ; m_val = null; 183 m_expression = null; 184 m_isVisible = true; 185 m_isFromWithParam = false; 186 } 187 188 195 public Arg(QName qname, String expression, boolean isFromWithParam) 196 { 197 198 m_qname = qname; 199 m_val = null; 200 m_expression = expression; 201 m_isFromWithParam = isFromWithParam; 202 m_isVisible = !isFromWithParam; 203 } 204 205 212 public Arg(QName qname, XObject val) 213 { 214 215 m_qname = qname; 216 m_val = val; 217 m_isVisible = true; 218 m_isFromWithParam = false; 219 m_expression = null; 220 } 221 222 230 public boolean equals(Object obj) 231 { 232 if(obj instanceof QName) 233 { 234 return m_qname.equals(obj); 235 } 236 else 237 return super.equals(obj); 238 } 239 240 247 public Arg(QName qname, XObject val, boolean isFromWithParam) 248 { 249 250 m_qname = qname; 251 m_val = val; 252 m_isFromWithParam = isFromWithParam; 253 m_isVisible = !isFromWithParam; 254 m_expression = null; 255 } 256 } 257 | Popular Tags |