org.jaxen.expr

Class DefaultLocationPath

Implemented Interfaces:
Expr, LocationPath, Serializable
Known Direct Subclasses:
DefaultAbsoluteLocationPath, DefaultRelativeLocationPath

(package private) abstract class DefaultLocationPath
extends DefaultExpr
implements LocationPath

Field Summary

private List
steps

Constructor Summary

DefaultLocationPath()
Create a new empty location path.

Method Summary

void
addStep(Step step)
Add the next step to this location path.
Object
evaluate(Context context)
List
getSteps()
Returns the ordered list of steps in this location path.
String
getText()
boolean
isAbsolute()
Returns true if this is an absolute location path; false if it isn't.
private boolean
isReverseAxis(Step step)
Expr
simplify()
String
toString()

Methods inherited from class org.jaxen.expr.DefaultExpr

convertToIterator, convertToList, simplify

Field Details

steps

private List steps

Constructor Details

DefaultLocationPath

(package private)  DefaultLocationPath()
Create a new empty location path.

Method Details

addStep

public void addStep(Step step)
Add the next step to this location path.
Specified by:
addStep in interface LocationPath
Parameters:
step -

evaluate

public Object evaluate(Context context)
            throws JaxenException
Specified by:
evaluate in interface Expr

getSteps

public List getSteps()
Returns the ordered list of steps in this location path. This list may be live.
Specified by:
getSteps in interface LocationPath
Returns:
the ordered list of steps in this location path

getText

public String getText()
Specified by:
getText in interface Expr

isAbsolute

public boolean isAbsolute()
Returns true if this is an absolute location path; false if it isn't. Absolute location paths all begiune with / or //.
Specified by:
isAbsolute in interface LocationPath
Returns:
true if this is an absol;ute location path; false if it isn't

isReverseAxis

private boolean isReverseAxis(Step step)

simplify

public Expr simplify()
Specified by:
simplify in interface Expr
Overrides:
simplify in interface DefaultExpr

toString

public String toString()