org.apache.xpath.compiler
public class OpMap extends Object
Field Summary | |
---|---|
static int | MAPINDEX_LENGTH
The length is always the opcode position + 1.
|
Method Summary | |
---|---|
void | error(String msg, Object[] args)
Tell the user of an error, and probably throw an
exception.
|
int | getArgLength(int opPos)
Get the length of an operation.
|
int | getArgLengthOfStep(int opPos)
Given a location step, get the length of that step.
|
static int | getFirstChildPos(int opPos)
Go to the first child of a given operation.
|
static int | getFirstChildPosOfStep(int opPos)
Get the first child position of a given location step.
|
int | getFirstPredicateOpPos(int opPos)
Given an FROM_stepType position, return the position of the
first predicate, if there is one, or else this will point
to the end of the FROM_stepType.
|
int | getNextOpPos(int opPos)
Given an operation position, return the end position, i.e. the
beginning of the next operation.
|
static int | getNextOpPos(int[] opMap, int opPos)
Given an operation position, return the end position, i.e. the
beginning of the next operation.
|
int | getNextStepPos(int opPos)
Given a location step position, return the end position, i.e. the
beginning of the next step.
|
int | getOp(int opPos)
Given an operation position, return the current op.
|
OpMapVector | getOpMap()
Get the opcode list that describes the XPath operations. |
String | getPatternString()
Return the expression as a string for diagnostics.
|
String | getStepLocalName(int opPosOfStep)
Get the local name of the step. |
String | getStepNS(int opPosOfStep)
Get the namespace of the step.
|
int | getStepTestType(int opPosOfStep)
Get the test type of the step, i.e. |
Object | getToken(int pos)
Get the XPath as a list of tokens.
|
ObjectVector | getTokenQueue()
Get the XPath as a list of tokens.
|
int | getTokenQueueSize()
Get size of the token queue.
|
void | setOp(int opPos, int value)
Set the op at index to the given int.
|
String | toString()
Return the expression as a string for diagnostics.
|
Parameters: msg An error msgkey that corresponds to one of the constants found in {@link org.apache.xpath.res.XPATHErrorResources}, which is a key for a format string. args An array of arguments represented in the format string, which may be null.
Throws: TransformerException if the current ErrorListoner determines to throw an exception.
Parameters: opPos The position of the operation in the op map.
Returns: The size of the operation.
Parameters: opPos Position of location step in op map.
Returns: The length of the step.
Parameters: opPos position of operation.
Returns: The position of the first child of the operation.
Parameters: opPos Position of location step in the location map.
Returns: The first child position of the step.
Parameters: opPos position of FROM_stepType op.
Returns: position of predicate in FROM_stepType structure.
Parameters: opPos An op position of an operation for which there is a size entry following.
Returns: position of next operation in m_opMap.
Parameters: opMap The operations map. opPos index to operation, for which there is a size entry following.
Returns: position of next operation in m_opMap.
Parameters: opPos the position of a location step.
Returns: the position of the next location step.
Parameters: opPos index into op map.
Returns: the op that corresponds to the opPos argument.
Returns: An IntVector that is the opcode list that describes the XPath operations.
Returns: The expression string.
Parameters: opPosOfStep The position of the FROM_XXX step.
Returns: OpCodes.EMPTY, OpCodes.ELEMWILDCARD, or the local name.
Parameters: opPosOfStep The position of the FROM_XXX step.
Returns: The step's namespace, NodeTest.WILD, or null for null namespace.
Parameters: opPosOfStep The position of the FROM_XXX step.
Returns: NODETYPE_XXX value.
Parameters: pos index into token queue.
Returns: The token, normally a string.
Returns: ObjectVector of tokens.
Returns: The size of the token queue.
Parameters: opPos index into op map. value Value to set
Returns: The expression string.