Package org.apache.xpath
Class Arg
java.lang.Object
org.apache.xpath.Arg
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
ConstructorsConstructorDescriptionArg()
Construct a dummy parameter argument, with no QName and no value (either expression string or value XObject). isVisible defaults to true.Construct a parameter argument that contains an expression.Construct a parameter argument which has an XObject value.Construct a parameter argument. -
Method Summary
Modifier and TypeMethodDescriptionvoid
detach()
Have the object release it's resources.boolean
Equality function specialized for the variable name.Get the value expression for this argument.final QName
getQName()
Get the qualified name for this argument.final XObject
getVal()
Get the value for this argument.boolean
Tell if this variable is a parameter passed with a with-param or as a top-level parameter.boolean
Tell if this variable is currently visible.void
setExpression
(String expr) Set the value expression for this argument.void
setIsVisible
(boolean b) Update visibility status of this variable.final void
Set the qualified name for this argument.final void
Set the value of this argument.
-
Constructor Details
-
Arg
public Arg()Construct a dummy parameter argument, with no QName and no value (either expression string or value XObject). isVisible defaults to true. -
Arg
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.isFromWithParam
- True if this is a parameter variable.
-
Arg
Construct a parameter argument which has an XObject value. isVisible defaults to true.- Parameters:
qname
- Name of the argument, expressed as a QName object.val
- Value of the argument, expressed as an XObject
-
Arg
Construct a parameter argument.- Parameters:
qname
- Name of the argument, expressed as a QName object.val
- Value of the argument, expressed as an XObjectisFromWithParam
- True if this is a parameter variable.
-
-
Method Details
-
getQName
Get the qualified name for this argument.- Returns:
- QName object containing the qualified name
-
setQName
Set the qualified name for this argument.- Parameters:
name
- QName object representing the new Qualified Name.
-
getVal
Get the value for this argument.- Returns:
- the argument's stored XObject value.
- See Also:
-
setVal
Set the value of this argument.- Parameters:
val
- an XObject representing the arguments's value.- See Also:
-
detach
public void detach()Have the object release it's resources. Call only when the variable or argument is going out of scope. -
getExpression
Get the value expression for this argument.- Returns:
- String containing the expression previously stored into this argument
- See Also:
-
setExpression
Set the value expression for this argument.- Parameters:
expr
- String containing the expression to be stored as this argument's value.- See Also:
-
isFromWithParam
public boolean isFromWithParam()Tell if this variable is a parameter passed with a with-param or as a top-level parameter. -
isVisible
public boolean isVisible()Tell if this variable is currently visible. -
setIsVisible
public void setIsVisible(boolean b) Update visibility status of this variable. -
equals
Equality function specialized for the variable name. If the argument is not a qname, it will deligate to the super class.
-