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

public Class UnionPattern

extends Expression
Class Inheritance
Imports
com.sun.org.apache.xml.internal.utils.QName, com.sun.org.apache.xpath.internal.Expression, .ExpressionOwner, .XPathContext, .XPathVisitor, com.sun.org.apache.xpath.internal.objects.XObject, java.util.List

This class represents a union pattern, which can have multiple individual StepPattern patterns.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class

Field Summary

Modifier and TypeField and Description
private StepPattern[]
m_patterns

Array of the contained step patterns to be tested.

pack-priv static final long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
callVisitors(ExpressionOwner owner, XPathVisitor visitor)

Implements com.sun.org.apache.xpath.internal.XPathVisitable.callVisitors.

This will traverse the heararchy, calling the visitor for each member.

public boolean

Returns:

true if traversal outside the context node's subtree can occur.
canTraverseOutsideSubtree
()

Overrides com.sun.org.apache.xpath.internal.Expression.canTraverseOutsideSubtree.

Tell if this expression or it's subexpressions can traverse outside the current subtree.

public boolean
deepEquals(Expression expr)

Implements abstract com.sun.org.apache.xpath.internal.Expression.deepEquals.

Compare this object with another object and see if they are equal, include the sub heararchy.

public XObject
public void
fixupVariables(List<QName> vars, int globalsSize)

Implements abstract com.sun.org.apache.xpath.internal.Expression.fixupVariables.

No arguments to process, so this does nothing.

public StepPattern[]

Returns:

an array of the contained step patterns to be tested.
getPatterns
()

Get the contained step patterns to be tested.

public void
setPatterns(StepPattern[]
the contained step patterns to be tested.
patterns
)

Set the contained step patterns to be tested.

Inherited from com.sun.org.apache.xpath.internal.Expression:
asIteratorasIteratorRawasNodeassertionboolerrorexecuteexecuteexecuteexecuteCharsToContentHandlerexprAddChildexprGetChildexprGetNumChildrenexprGetParentexprSetParentgetColumnNumbergetExpressionOwnergetLineNumbergetPublicIdgetSystemIdisNodesetExprisSameClassisStableNumbernumwarnxstr

Field Detail

m_patternsback to summary
private StepPattern[] m_patterns

Array of the contained step patterns to be tested.

serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Hides com.sun.org.apache.xpath.internal.Expression.serialVersionUID.

Constructor Detail

UnionPatternback to summary
public UnionPattern()

Method Detail

callVisitorsback to summary
public void callVisitors(ExpressionOwner owner, XPathVisitor visitor)

Implements com.sun.org.apache.xpath.internal.XPathVisitable.callVisitors.

Doc from com.sun.org.apache.xpath.internal.XPathVisitable.callVisitors.

This will traverse the heararchy, calling the visitor for each member. If the called visitor method returns false, the subtree should not be called.

See Also
com.sun.org.apache.xpath.internal.XPathVisitable#callVisitors(ExpressionOwner, XPathVisitor)
canTraverseOutsideSubtreeback to summary
public boolean canTraverseOutsideSubtree()

Overrides com.sun.org.apache.xpath.internal.Expression.canTraverseOutsideSubtree.

Tell if this expression or it's subexpressions can traverse outside the current subtree.

Returns:boolean

true if traversal outside the context node's subtree can occur.

deepEqualsback to summary
public boolean deepEquals(Expression expr)

Implements abstract com.sun.org.apache.xpath.internal.Expression.deepEquals.

Doc from com.sun.org.apache.xpath.internal.Expression.deepEquals.

Compare this object with another object and see if they are equal, include the sub heararchy.

See Also
Expression#deepEquals(Expression)
executeback to summary
public XObject execute(XPathContext xctxt) throws TransformerException

Implements abstract com.sun.org.apache.xpath.internal.Expression.execute.

Test a node to see if it matches any of the patterns in the union.

Parameters
xctxt:XPathContext

XPath runtime context.

Returns:XObject

com.sun.org.apache.xpath.internal.patterns.NodeTest#SCORE_NODETEST, com.sun.org.apache.xpath.internal.patterns.NodeTest#SCORE_NONE, com.sun.org.apache.xpath.internal.patterns.NodeTest#SCORE_NSWILD, com.sun.org.apache.xpath.internal.patterns.NodeTest#SCORE_QNAME, or com.sun.org.apache.xpath.internal.patterns.NodeTest#SCORE_OTHER.

Exceptions
TransformerException:

Doc from com.sun.org.apache.xpath.internal.Expression.execute.

if a runtime exception occurs.

fixupVariablesback to summary
public void fixupVariables(List<QName> vars, int globalsSize)

Implements abstract com.sun.org.apache.xpath.internal.Expression.fixupVariables.

No arguments to process, so this does nothing.

getPatternsback to summary
public StepPattern[] getPatterns()

Get the contained step patterns to be tested.

Returns:StepPattern[]

an array of the contained step patterns to be tested.

setPatternsback to summary
public void setPatterns(StepPattern[] patterns)

Set the contained step patterns to be tested.

Parameters
patterns:StepPattern[]

the contained step patterns to be tested.

com.sun.org.apache.xpath.internal.patterns back to summary

pack-priv Class UnionPattern.UnionPathPartOwner

extends Object
implements ExpressionOwner
Class Inheritance
  • java.lang.Object
  • com.sun.org.apache.xpath.internal.patterns.UnionPattern.UnionPathPartOwner
All Implemented Interfaces
com.sun.org.apache.xpath.internal.ExpressionOwner

Field Summary

Modifier and TypeField and Description
pack-priv int

Constructor Summary

AccessConstructor and Description
pack-priv
UnionPathPartOwner(int index)

Method Summary

Modifier and TypeMethod and Description
public Expression
getExpression()

Implements com.sun.org.apache.xpath.internal.ExpressionOwner.getExpression.

Get the raw Expression object that this class wraps.

public void
setExpression(Expression exp)

Implements com.sun.org.apache.xpath.internal.ExpressionOwner.setExpression.

Set the raw expression object for this object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

m_indexback to summary
pack-priv int m_index

Constructor Detail

UnionPathPartOwnerback to summary
pack-priv UnionPathPartOwner(int index)

Method Detail

getExpressionback to summary
public Expression getExpression()

Implements com.sun.org.apache.xpath.internal.ExpressionOwner.getExpression.

Doc from com.sun.org.apache.xpath.internal.ExpressionOwner.getExpression.

Get the raw Expression object that this class wraps.

See Also
ExpressionOwner#getExpression()
setExpressionback to summary
public void setExpression(Expression exp)

Implements com.sun.org.apache.xpath.internal.ExpressionOwner.setExpression.

Doc from com.sun.org.apache.xpath.internal.ExpressionOwner.setExpression.

Set the raw expression object for this object.

See Also
ExpressionOwner#setExpression(Expression)