APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.org.apache.xpath.internal

public Class Arg

extends Object
Class Inheritance
Imports
com.sun.org.apache.xml.internal.utils.QName, com.sun.org.apache.xpath.internal.objects.XObject, java.util.Objects

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.

Field Summary

Modifier and TypeField and Description
private String
m_expression

Field m_expression: Stored expression value of this argument.

private boolean
m_isFromWithParam

True if this variable was added with an xsl:with-param or is added via setParameter.

private boolean
m_isVisible

True if this variable is currently visible.

private QName
m_qname

Field m_qname: The name of this argument, expressed as a QName (Qualified Name) object.

private XObject
m_val

Field m_val: Stored XObject value of this argument

Constructor Summary

AccessConstructor and Description
public
Arg()

Construct a dummy parameter argument, with no QName and no value (either expression string or value XObject).

public
Arg(QName
Name of the argument, expressed as a QName object.
qname
,
String
String to be stored as this argument's value expression.
expression
,
boolean
True if this is a parameter variable.
isFromWithParam
)

Construct a parameter argument that contains an expression.

public
Arg(QName
Name of the argument, expressed as a QName object.
qname
,
XObject
Value of the argument, expressed as an XObject
val
)

Construct a parameter argument which has an XObject value.

public
Arg(QName
Name of the argument, expressed as a QName object.
qname
,
XObject
Value of the argument, expressed as an XObject
val
,
boolean
True if this is a parameter variable.
isFromWithParam
)

Construct a parameter argument.

Method Summary

Modifier and TypeMethod and Description
public void
detach()

Have the object release it's resources.

public boolean

Returns:

true if this object is the same as the obj argument; false otherwise.
equals
(Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

Equality function specialized for the variable name.

public String

Returns:

String containing the expression previously stored into this argument
getExpression
()

Get the value expression for this argument.

public final QName

Returns:

QName object containing the qualified name
getQName
()

Get the qualified name for this argument.

public final XObject

Returns:

the argument's stored XObject value.
getVal
()

Get the value for this argument.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

public boolean
isFromWithParam()

Tell if this variable is a parameter passed with a with-param or as a top-level parameter.

public boolean
isVisible()

Tell if this variable is currently visible.

public void
setExpression(String
String containing the expression to be stored as this argument's value.
expr
)

Set the value expression for this argument.

public void
setIsVisible(boolean b)

Update visibility status of this variable.

public final void
setQName(QName
QName object representing the new Qualified Name.
name
)

Set the qualified name for this argument.

public final void
setVal(XObject
an XObject representing the arguments's value.
val
)

Set the value of this argument.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAlltoStringwaitwaitwait

Field Detail

m_expressionback to summary
private String m_expression

Field m_expression: Stored expression value of this argument.

See Also
setExpression, getExpression
m_isFromWithParamback to summary
private boolean m_isFromWithParam

True if this variable was added with an xsl:with-param or is added via setParameter.

m_isVisibleback to summary
private boolean m_isVisible

True if this variable is currently visible. To be visible, a variable needs to come either from xsl:variable or be a "received" parameter, ie one for which an xsl:param has been encountered. Set at the time the object is constructed and updated as needed.

m_qnameback to summary
private QName m_qname

Field m_qname: The name of this argument, expressed as a QName (Qualified Name) object.

See Also
getQName, setQName
m_valback to summary
private XObject m_val

Field m_val: Stored XObject value of this argument

See Also
getVal(), setVal()

Constructor Detail

Argback to summary
public Arg()

Construct a dummy parameter argument, with no QName and no value (either expression string or value XObject). isVisible defaults to true.

Argback to summary
public Arg(QName qname, String expression, boolean isFromWithParam)

Construct a parameter argument that contains an expression.

Parameters
qname:QName

Name of the argument, expressed as a QName object.

expression:String

String to be stored as this argument's value expression.

isFromWithParam:boolean

True if this is a parameter variable.

Argback to summary
public Arg(QName qname, XObject val)

Construct a parameter argument which has an XObject value. isVisible defaults to true.

Parameters
qname:QName

Name of the argument, expressed as a QName object.

val:XObject

Value of the argument, expressed as an XObject

Argback to summary
public Arg(QName qname, XObject val, boolean isFromWithParam)

Construct a parameter argument.

Parameters
qname:QName

Name of the argument, expressed as a QName object.

val:XObject

Value of the argument, expressed as an XObject

isFromWithParam:boolean

True if this is a parameter variable.

Method Detail

detachback to summary
public void detach()

Have the object release it's resources. Call only when the variable or argument is going out of scope.

equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

Equality function specialized for the variable name. If the argument is not a qname, it will deligate to the super class.

Parameters
obj:Object

the reference object with which to compare.

Returns:boolean

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getExpressionback to summary
public String getExpression()

Get the value expression for this argument.

Returns:String

String containing the expression previously stored into this argument

See Also
setExpression
getQNameback to summary
public final QName getQName()

Get the qualified name for this argument.

Returns:QName

QName object containing the qualified name

getValback to summary
public final XObject getVal()

Get the value for this argument.

Returns:XObject

the argument's stored XObject value.

See Also
setVal(XObject)
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Annotations
@Override
isFromWithParamback to summary
public boolean isFromWithParam()

Tell if this variable is a parameter passed with a with-param or as a top-level parameter.

isVisibleback to summary
public boolean isVisible()

Tell if this variable is currently visible.

setExpressionback to summary
public void setExpression(String expr)

Set the value expression for this argument.

Parameters
expr:String

String containing the expression to be stored as this argument's value.

See Also
getExpression
setIsVisibleback to summary
public void setIsVisible(boolean b)

Update visibility status of this variable.

setQNameback to summary
public final void setQName(QName name)

Set the qualified name for this argument.

Parameters
name:QName

QName object representing the new Qualified Name.

setValback to summary
public final void setVal(XObject val)

Set the value of this argument.

Parameters
val:XObject

an XObject representing the arguments's value.

See Also
getVal()