Java Doc for OpMap.java in  » XML » xalan » org » apache » xpath » compiler » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » XML » xalan » org.apache.xpath.compiler 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.xpath.compiler.OpMap

All known Subclasses:   org.apache.xpath.compiler.Compiler,
OpMap
public class OpMap (Code)
This class represents the data structure basics of the XPath object.


Field Summary
final static  intBLOCKTOKENQUEUESIZE
    
final public static  intMAPINDEX_LENGTH
     The length is always the opcode position + 1.
final static  intMAXTOKENQUEUESIZE
     The starting size of the token queue.
protected  Stringm_currentPattern
    
 OpMapVectorm_opMap
     An operations map is used instead of a proper parse tree.
 ObjectVectorm_tokenQueue
     TokenStack is the queue of used tokens.


Method Summary
public  voiderror(String msg, Object[] args)
     Tell the user of an error, and probably throw an exception.
public  intgetArgLength(int opPos)
     Get the length of an operation.
Parameters:
  opPos - The position of the operation in the op map.
public  intgetArgLengthOfStep(int opPos)
     Given a location step, get the length of that step.
Parameters:
  opPos - Position of location step in op map.
public static  intgetFirstChildPos(int opPos)
     Go to the first child of a given operation.
Parameters:
  opPos - position of operation.
public static  intgetFirstChildPosOfStep(int opPos)
     Get the first child position of a given location step.
Parameters:
  opPos - Position of location step in the location map.
public  intgetFirstPredicateOpPos(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. Example: int posOfPredicate = xpath.getNextOpPos(stepPos); boolean hasPredicates = OpCodes.OP_PREDICATE == xpath.getOp(posOfPredicate);
Parameters:
  opPos - position of FROM_stepType op.
public  intgetNextOpPos(int opPos)
     Given an operation position, return the end position, i.e.
public static  intgetNextOpPos(int[] opMap, int opPos)
     Given an operation position, return the end position, i.e.
public  intgetNextStepPos(int opPos)
     Given a location step position, return the end position, i.e.
public  intgetOp(int opPos)
     Given an operation position, return the current op.
Parameters:
  opPos - index into op map.
public  OpMapVectorgetOpMap()
     Get the opcode list that describes the XPath operations.
public  StringgetPatternString()
     Return the expression as a string for diagnostics.
public  StringgetStepLocalName(int opPosOfStep)
     Get the local name of the step.
Parameters:
  opPosOfStep - The position of the FROM_XXX step.
public  StringgetStepNS(int opPosOfStep)
     Get the namespace of the step.
Parameters:
  opPosOfStep - The position of the FROM_XXX step.
public  intgetStepTestType(int opPosOfStep)
     Get the test type of the step, i.e.
public  ObjectgetToken(int pos)
     Get the XPath as a list of tokens.
Parameters:
  pos - index into token queue.
public  ObjectVectorgetTokenQueue()
     Get the XPath as a list of tokens.
public  intgetTokenQueueSize()
     Get size of the token queue.
public  voidsetOp(int opPos, int value)
     Set the op at index to the given int.
 voidshrink()
     Replace the large arrays with a small array.
public  StringtoString()
     Return the expression as a string for diagnostics.

Field Detail
BLOCKTOKENQUEUESIZE
final static int BLOCKTOKENQUEUESIZE(Code)



MAPINDEX_LENGTH
final public static int MAPINDEX_LENGTH(Code)
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
final static int MAXTOKENQUEUESIZE(Code)
The starting size of the token queue.



m_currentPattern
protected String m_currentPattern(Code)
The current pattern string, for diagnostics purposes



m_opMap
OpMapVector m_opMap(Code)
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
ObjectVector m_tokenQueue(Code)
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.





Method Detail
error
public void error(String msg, Object[] args) throws javax.xml.transform.TransformerException(Code)
Tell the user of an error, and probably throw an exception.
Parameters:
  msg - An error msgkey that corresponds to one of the constants found in org.apache.xpath.res.XPATHErrorResources, which is a key for a format string.
Parameters:
  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.



getArgLength
public int getArgLength(int opPos)(Code)
Get the length of an operation.
Parameters:
  opPos - The position of the operation in the op map. The size of the operation.



getArgLengthOfStep
public int getArgLengthOfStep(int opPos)(Code)
Given a location step, get the length of that step.
Parameters:
  opPos - Position of location step in op map. The length of the step.



getFirstChildPos
public static int getFirstChildPos(int opPos)(Code)
Go to the first child of a given operation.
Parameters:
  opPos - position of operation. The position of the first child of the operation.



getFirstChildPosOfStep
public static int getFirstChildPosOfStep(int opPos)(Code)
Get the first child position of a given location step.
Parameters:
  opPos - Position of location step in the location map. The first child position of the step.



getFirstPredicateOpPos
public int getFirstPredicateOpPos(int opPos) throws javax.xml.transform.TransformerException(Code)
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);
Parameters:
  opPos - position of FROM_stepType op. position of predicate in FROM_stepType structure.



getNextOpPos
public int getNextOpPos(int opPos)(Code)
Given an operation position, return the end position, i.e. the beginning of the next operation.
Parameters:
  opPos - An op position of an operation for which there is a size entry following. position of next operation in m_opMap.



getNextOpPos
public static int getNextOpPos(int[] opMap, int opPos)(Code)
Given an operation position, return the end position, i.e. the beginning of the next operation.
Parameters:
  opMap - The operations map.
Parameters:
  opPos - index to operation, for which there is a size entry following. position of next operation in m_opMap.



getNextStepPos
public int getNextStepPos(int opPos)(Code)
Given a location step position, return the end position, i.e. the beginning of the next step.
Parameters:
  opPos - the position of a location step. the position of the next location step.



getOp
public int getOp(int opPos)(Code)
Given an operation position, return the current op.
Parameters:
  opPos - index into op map. the op that corresponds to the opPos argument.



getOpMap
public OpMapVector getOpMap()(Code)
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. An IntVector that is the opcode list that describes the XPath operations.



getPatternString
public String getPatternString()(Code)
Return the expression as a string for diagnostics. The expression string.



getStepLocalName
public String getStepLocalName(int opPosOfStep)(Code)
Get the local name of the step.
Parameters:
  opPosOfStep - The position of the FROM_XXX step. OpCodes.EMPTY, OpCodes.ELEMWILDCARD, or the local name.



getStepNS
public String getStepNS(int opPosOfStep)(Code)
Get the namespace of the step.
Parameters:
  opPosOfStep - The position of the FROM_XXX step. The step's namespace, NodeTest.WILD, or null for null namespace.



getStepTestType
public int getStepTestType(int opPosOfStep)(Code)
Get the test type of the step, i.e. NODETYPE_XXX value.
Parameters:
  opPosOfStep - The position of the FROM_XXX step. NODETYPE_XXX value.



getToken
public Object getToken(int pos)(Code)
Get the XPath as a list of tokens.
Parameters:
  pos - index into token queue. The token, normally a string.



getTokenQueue
public ObjectVector getTokenQueue()(Code)
Get the XPath as a list of tokens. ObjectVector of tokens.



getTokenQueueSize
public int getTokenQueueSize()(Code)
Get size of the token queue. The size of the token queue.



setOp
public void setOp(int opPos, int value)(Code)
Set the op at index to the given int.
Parameters:
  opPos - index into op map.
Parameters:
  value - Value to set



shrink
void shrink()(Code)
Replace the large arrays with a small array.



toString
public String toString()(Code)
Return the expression as a string for diagnostics. The expression string.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.