org.apache.xpath
Class Arg

java.lang.Object
  |
  +--org.apache.xpath.Arg

public class Arg
extends java.lang.Object

**For internal use only** This class holds an instance of an argument on the stack. The value of the argument can be either an XObject or a String containing an expression.


Constructor Summary
Arg()
          Construct a dummy parameter argument, with no QName and no value (either expression string or value XObject).
Arg(QName qname, java.lang.String expression, boolean isParamVar)
          Construct a parameter argument that contains an expression.
Arg(QName qname, XObject val)
          Construct a parameter argument which has an XObject value.
Arg(QName qname, XObject val, boolean isParamVar)
          Construct a parameter argument.
 
Method Summary
 boolean equals(java.lang.Object obj)
          Equality function specialized for the variable name.
 java.lang.String getExpression()
          Get the value expression for this argument.
 QName getQName()
          Get the qualified name for this argument.
 XObject getVal()
          Get the value for this argument.
 boolean isParamVar()
          Tell if this variable is a param var.
 void setExpression(java.lang.String expr)
          Set the value expression for this argument.
 void setIsParamVar(boolean b)
          Tell if this variable is a param var.
 void setQName(QName name)
          Set the qualified name for this argument.
 void setVal(XObject val)
          Set the value of this argument.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Arg

public Arg()
Construct a dummy parameter argument, with no QName and no value (either expression string or value XObject). isParameterVar defaults to false.

Arg

public Arg(QName qname,
           java.lang.String expression,
           boolean isParamVar)
Construct a parameter argument that contains an expression.
Parameters:
qname - Name of the argument, expressed as a QName object.
expression - String to be stored as this argument's value expression.
isParamVar - True if this is a parameter variable.

Arg

public Arg(QName qname,
           XObject val)
Construct a parameter argument which has an XObject value. isParamVar defaults to false.
Parameters:
qname - Name of the argument, expressed as a QName object.
val - Value of the argument, expressed as an XObject

Arg

public Arg(QName qname,
           XObject val,
           boolean isParamVar)
Construct a parameter argument.
Parameters:
qname - Name of the argument, expressed as a QName object.
val - Value of the argument, expressed as an XObject
isParamVar - True if this is a parameter variable.
Method Detail

getQName

public QName getQName()
Get the qualified name for this argument.
Returns:
QName object containing the qualified name

setQName

public void setQName(QName name)
Set the qualified name for this argument.
Parameters:
name - QName object representing the new Qualified Name.

getVal

public XObject getVal()
Get the value for this argument.
Returns:
the argument's stored XObject value.
See Also:
setVal(XObject)

setVal

public void setVal(XObject val)
Set the value of this argument.
Parameters:
val - an XObject representing the arguments's value.
See Also:
getVal()

getExpression

public java.lang.String getExpression()
Get the value expression for this argument.
Returns:
String containing the expression previously stored into this argument
See Also:
setExpression(java.lang.String)

setExpression

public void setExpression(java.lang.String expr)
Set the value expression for this argument.
Parameters:
expr - String containing the expression to be stored as this argument's value.
See Also:
getExpression()

isParamVar

public boolean isParamVar()
Tell if this variable is a param var.

setIsParamVar

public void setIsParamVar(boolean b)
Tell if this variable is a param var.

equals

public boolean equals(java.lang.Object obj)
Equality function specialized for the variable name. If the argument is not a qname, it will deligate to the super class.
Parameters:
obj - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.
Overrides:
equals in class java.lang.Object


Copyright � 2000 Apache XML Project. All Rights Reserved.