| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final int | |
| protected String | m_currentPattern
The current pattern string, for diagnostics purposes |
| pack-priv OpMapVector | m_opMap
An operations map is used instead of a proper parse tree. |
| pack-priv ObjectVector | m_tokenQueue
TokenStack is the queue of used tokens. |
| public static final int | MAPINDEX_LENGTH
The length is always the opcode position + 1. |
| pack-priv static final int | MAXTOKENQUEUESIZE
The starting size of the token queue. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | error(String
An error msgkey that corresponds to one of the constants found
in msg, Object[] com., which is
a key for a format string.An array of arguments represented in the format string, which
may be null. args)Tell the user of an error, and probably throw an exception. |
| public int | Returns: The size of the operation.The position of the operation in the op map. opPos)Get the length of an operation. |
| public int | Returns: The length of the step.Position of location step in op map. opPos)Given a location step, get the length of that step. |
| public static int | Returns: The position of the first child of the operation.position of operation. opPos)Go to the first child of a given operation. |
| public static int | Returns: The first child position of the step.Position of location step in the location map. opPos)Get the first child position of a given location step. |
| public int | Returns: position of predicate in FROM_stepType structure.position of FROM_stepType op. 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. |
| public int | Returns: position of next operation in m_opMap.An op position of an operation for which there is a size
entry following. opPos)Given an operation position, return the end position, i.e. the beginning of the next operation. |
| public static int | Returns: position of next operation in m_opMap.The operations map. opMap, int index to operation, for which there is a size entry following. opPos)Given an operation position, return the end position, i.e. the beginning of the next operation. |
| public int | Returns: the position of the next location step.the position of a location step. opPos)Given a location step position, return the end position, i.e. the beginning of the next step. |
| public int | Returns: the op that corresponds to the opPos argument.index into op map. opPos)Given an operation position, return the current op. |
| public OpMapVector | Returns: An IntVector that is the opcode list that describes the XPath operations.Get the opcode list that describes the XPath operations. |
| public String | |
| public String | Returns: OpCodes.EMPTY, OpCodes.ELEMWILDCARD, or the local name.The position of the FROM_XXX step. opPosOfStep)Get the local name of the step. |
| public String | Returns: The step's namespace, NodeTest.WILD, or null for null namespace.The position of the FROM_XXX step. opPosOfStep)Get the namespace of the step. |
| public int | Returns: NODETYPE_XXX value.The position of the FROM_XXX step. opPosOfStep)Get the test type of the step, i.e. NODETYPE_XXX value. |
| public Object | Returns: The token, normally a string.index into token queue. pos)Get the XPath as a list of tokens. |
| public ObjectVector | |
| public int | |
| public void | |
| pack-priv void | |
| public String | Returns: The expression string.Overrides java. Return the expression as a string for diagnostics. |
| BLOCKTOKENQUEUESIZE | back to summary |
|---|---|
| pack-priv static final int BLOCKTOKENQUEUESIZE | |
| m_currentPattern | back to summary |
|---|---|
| protected String m_currentPattern The current pattern string, for diagnostics purposes | |
| m_opMap | back to summary |
|---|---|
| pack-priv OpMapVector m_opMap An operations map is used instead of a proper parse tree. It contains operations codes and indexes into the m_tokenQueue. I use an array instead of a full parse tree in order to cut down on the number of objects created. | |
| m_tokenQueue | back to summary |
|---|---|
| pack-priv ObjectVector m_tokenQueue TokenStack is the queue of used tokens. The current token is the token at the end of the m_tokenQueue. The idea is that the queue can be marked and a sequence of tokens can be reused. | |
| MAPINDEX_LENGTH | back to summary |
|---|---|
| public static final int MAPINDEX_LENGTH The length is always the opcode position + 1. Length is always expressed as the opcode+length bytes, so it is always 2 or greater. | |
| MAXTOKENQUEUESIZE | back to summary |
|---|---|
| pack-priv static final int MAXTOKENQUEUESIZE The starting size of the token queue. | |
| OpMap | back to summary |
|---|---|
| public OpMap() | |
| error | back to summary |
|---|---|
| public void error(String msg, Object[] args) throws TransformerException Tell the user of an error, and probably throw an exception.
| |
| getArgLength | back to summary |
|---|---|
| public int getArgLength(int opPos) Get the length of an operation.
| |
| getArgLengthOfStep | back to summary |
|---|---|
| public int getArgLengthOfStep(int opPos) Given a location step, get the length of that step.
| |
| getFirstChildPos | back to summary |
|---|---|
| public static int getFirstChildPos(int opPos) Go to the first child of a given operation.
| |
| getFirstChildPosOfStep | back to summary |
|---|---|
| public static int getFirstChildPosOfStep(int opPos) Get the first child position of a given location step.
| |
| getFirstPredicateOpPos | back to summary |
|---|---|
| public int getFirstPredicateOpPos(int opPos) throws TransformerException 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. Example: int posOfPredicate = xpath.getNextOpPos(stepPos); boolean hasPredicates = OpCodes.OP_PREDICATE == xpath.getOp(posOfPredicate);
| |
| getNextOpPos | back to summary |
|---|---|
| public int getNextOpPos(int opPos) Given an operation position, return the end position, i.e. the beginning of the next operation.
| |
| getNextOpPos | back to summary |
|---|---|
| public static int getNextOpPos(int[] opMap, int opPos) Given an operation position, return the end position, i.e. the beginning of the next operation.
| |
| getNextStepPos | back to summary |
|---|---|
| public int getNextStepPos(int opPos) Given a location step position, return the end position, i.e. the beginning of the next step.
| |
| getOp | back to summary |
|---|---|
| public int getOp(int opPos) Given an operation position, return the current op.
| |
| getOpMap | back to summary |
|---|---|
| public OpMapVector getOpMap() Get the opcode list that describes the XPath operations. It contains operations codes and indexes into the m_tokenQueue. I use an array instead of a full parse tree in order to cut down on the number of objects created.
| |
| getPatternString | back to summary |
|---|---|
| public String getPatternString() Return the expression as a string for diagnostics.
| |
| getStepLocalName | back to summary |
|---|---|
| public String getStepLocalName(int opPosOfStep) Get the local name of the step.
| |
| getStepNS | back to summary |
|---|---|
| public String getStepNS(int opPosOfStep) Get the namespace of the step.
| |
| getStepTestType | back to summary |
|---|---|
| public int getStepTestType(int opPosOfStep) Get the test type of the step, i.e. NODETYPE_XXX value.
| |
| getToken | back to summary |
|---|---|
| public Object getToken(int pos) Get the XPath as a list of tokens.
| |
| getTokenQueue | back to summary |
|---|---|
| public ObjectVector getTokenQueue() Get the XPath as a list of tokens.
| |
| getTokenQueueSize | back to summary |
|---|---|
| public int getTokenQueueSize() Get size of the token queue.
| |
| setOp | back to summary |
|---|---|
| public void setOp(int opPos, int value) Set the op at index to the given int.
| |
| shrink | back to summary |
|---|---|
| pack-priv void shrink() Replace the large arrays with a small array. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Return the expression as a string for diagnostics.
| |