Java Doc for VariableStack.java in  » XML » xalan » org » apache » xpath » 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 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.xpath.VariableStack

All known Subclasses:   org.apache.xpath.jaxp.JAXPVariableStack,
VariableStack
public class VariableStack implements Cloneable(Code)
Defines a class to keep track of a stack for template arguments and variables.

This has been changed from the previous incarnations of this class to be fairly low level.



Field Summary
final public static  intCLEARLIMITATION
    
 int_frameTop
     The top of the stack frame (_stackFrames).
 int[]_links
     The stack of frame positions.
 int_linksTop
     The top of the links stack.
 XObject[]_stackFrames
     The stack frame where all variables and params will be kept.

Constructor Summary
public  VariableStack()
     Constructor for a variable stack.

Method Summary
public  voidclearLocalSlots(int start, int len)
     Use this to clear the variables in a section of the stack.
public synchronized  Objectclone()
     Returns a clone of this variable stack.
public  XObjectelementAt(int i)
     Get the element at the given index, regardless of stackframe.
Parameters:
  i - index from zero.
public  XObjectgetGlobalVariable(XPathContext xctxt, int index)
     Get a global variable or parameter from the global stack frame.
Parameters:
  xctxt - The XPath context, which must be passed in order tolazy evaluate variables.
Parameters:
  index - Global variable index relative to the global stackframe bottom.
public  XObjectgetGlobalVariable(XPathContext xctxt, int index, boolean destructiveOK)
     Get a global variable or parameter from the global stack frame.
Parameters:
  xctxt - The XPath context, which must be passed in order tolazy evaluate variables.
Parameters:
  index - Global variable index relative to the global stackframe bottom.
public  XObjectgetLocalVariable(XPathContext xctxt, int index)
     Get a local variable or parameter in the current stack frame.
Parameters:
  xctxt - The XPath context, which must be passed in order tolazy evaluate variables.
Parameters:
  index - Local variable index relative to the current stackframe bottom.
public  XObjectgetLocalVariable(int index, int frame)
     Get a local variable or parameter in the current stack frame.
public  XObjectgetLocalVariable(XPathContext xctxt, int index, boolean destructiveOK)
     Get a local variable or parameter in the current stack frame.
Parameters:
  xctxt - The XPath context, which must be passed in order tolazy evaluate variables.
Parameters:
  index - Local variable index relative to the current stackframe bottom.
public  intgetStackFrame()
     Get the position from where the search should start, which is either the searchStart property, or the top of the stack if that value is -1.
public  XObjectgetVariableOrParam(XPathContext xctxt, org.apache.xml.utils.QName qname)
     Get a variable based on it's qualified name. This is for external use only.
Parameters:
  xctxt - The XPath context, which must be passed in order tolazy evaluate variables.
Parameters:
  qname - The qualified name of the variable.
public  booleanisLocalSet(int index)
     Tell if a local variable has been set or not.
Parameters:
  index - Local variable index relative to the current stackframe bottom.
public  intlink(int size)
     Allocates memory (called a stackframe) on the stack; used to store local variables and parameter arguments.

I use the link/unlink concept because of distant Motorola 68000 assembler memories.


Parameters:
  size - The size of the stack frame allocation.
public  voidreset()
     Reset the stack to a start position.
public  voidsetGlobalVariable(int index, XObject val)
     Set a global variable or parameter in the global stack frame.
public  voidsetLocalVariable(int index, XObject val)
     Set a local variable or parameter in the current stack frame.
public  voidsetLocalVariable(int index, XObject val, int stackFrame)
     Set a local variable or parameter in the specified stack frame.
public  voidsetStackFrame(int sf)
     Set the current stack frame.
public  intsize()
     Get size of the stack.
public  voidunlink()
     Free up the stack frame that was last allocated with VariableStack.link(int size) .
public  voidunlink(int currentFrame)
     Free up the stack frame that was last allocated with VariableStack.link(int size) .

Field Detail
CLEARLIMITATION
final public static int CLEARLIMITATION(Code)
limitation for 1K



_frameTop
int _frameTop(Code)
The top of the stack frame (_stackFrames).



_links
int[] _links(Code)
The stack of frame positions. I call 'em links because of distant Motorola 68000 assembler memories. :-)



_linksTop
int _linksTop(Code)
The top of the links stack.



_stackFrames
XObject[] _stackFrames(Code)
The stack frame where all variables and params will be kept.




Constructor Detail
VariableStack
public VariableStack()(Code)
Constructor for a variable stack.




Method Detail
clearLocalSlots
public void clearLocalSlots(int start, int len)(Code)
Use this to clear the variables in a section of the stack. This is used to clear the parameter section of the stack, so that default param values can tell if they've already been set. It is important to note that this function has a 1K limitation.
Parameters:
  start - The start position, relative to the current local stack frame.
Parameters:
  len - The number of slots to be cleared.



clone
public synchronized Object clone() throws CloneNotSupportedException(Code)
Returns a clone of this variable stack. a clone of this variable stack.
throws:
  CloneNotSupportedException -



elementAt
public XObject elementAt(int i)(Code)
Get the element at the given index, regardless of stackframe.
Parameters:
  i - index from zero. The item at the given index.



getGlobalVariable
public XObject getGlobalVariable(XPathContext xctxt, int index) throws TransformerException(Code)
Get a global variable or parameter from the global stack frame.
Parameters:
  xctxt - The XPath context, which must be passed in order tolazy evaluate variables.
Parameters:
  index - Global variable index relative to the global stackframe bottom. The value of the variable.
throws:
  TransformerException -



getGlobalVariable
public XObject getGlobalVariable(XPathContext xctxt, int index, boolean destructiveOK) throws TransformerException(Code)
Get a global variable or parameter from the global stack frame.
Parameters:
  xctxt - The XPath context, which must be passed in order tolazy evaluate variables.
Parameters:
  index - Global variable index relative to the global stackframe bottom. The value of the variable.
throws:
  TransformerException -



getLocalVariable
public XObject getLocalVariable(XPathContext xctxt, int index) throws TransformerException(Code)
Get a local variable or parameter in the current stack frame.
Parameters:
  xctxt - The XPath context, which must be passed in order tolazy evaluate variables.
Parameters:
  index - Local variable index relative to the current stackframe bottom. The value of the variable.
throws:
  TransformerException -



getLocalVariable
public XObject getLocalVariable(int index, int frame) throws TransformerException(Code)
Get a local variable or parameter in the current stack frame.
Parameters:
  index - Local variable index relative to the givenframe bottom.NEEDSDOC @param frame The value of the variable.
throws:
  TransformerException -



getLocalVariable
public XObject getLocalVariable(XPathContext xctxt, int index, boolean destructiveOK) throws TransformerException(Code)
Get a local variable or parameter in the current stack frame.
Parameters:
  xctxt - The XPath context, which must be passed in order tolazy evaluate variables.
Parameters:
  index - Local variable index relative to the current stackframe bottom. The value of the variable.
throws:
  TransformerException -



getStackFrame
public int getStackFrame()(Code)
Get the position from where the search should start, which is either the searchStart property, or the top of the stack if that value is -1. The current stack frame position.



getVariableOrParam
public XObject getVariableOrParam(XPathContext xctxt, org.apache.xml.utils.QName qname) throws javax.xml.transform.TransformerException(Code)
Get a variable based on it's qualified name. This is for external use only.
Parameters:
  xctxt - The XPath context, which must be passed in order tolazy evaluate variables.
Parameters:
  qname - The qualified name of the variable. The evaluated value of the variable.
throws:
  javax.xml.transform.TransformerException -



isLocalSet
public boolean isLocalSet(int index) throws TransformerException(Code)
Tell if a local variable has been set or not.
Parameters:
  index - Local variable index relative to the current stackframe bottom. true if the value at the index is not null.
throws:
  TransformerException -



link
public int link(int size)(Code)
Allocates memory (called a stackframe) on the stack; used to store local variables and parameter arguments.

I use the link/unlink concept because of distant Motorola 68000 assembler memories.


Parameters:
  size - The size of the stack frame allocation. This ammount shouldnormally be the maximum number of variables that you can have allocatedat one time in the new stack frame. The bottom of the stack frame, from where local variable addressingshould start from.



reset
public void reset()(Code)
Reset the stack to a start position. the total size of the execution stack.



setGlobalVariable
public void setGlobalVariable(int index, XObject val)(Code)
Set a global variable or parameter in the global stack frame.
Parameters:
  index - Local variable index relative to the global stack framebottom.
Parameters:
  val - The value of the variable that is being set.



setLocalVariable
public void setLocalVariable(int index, XObject val)(Code)
Set a local variable or parameter in the current stack frame.
Parameters:
  index - Local variable index relative to the current stackframe bottom.
Parameters:
  val - The value of the variable that is being set.



setLocalVariable
public void setLocalVariable(int index, XObject val, int stackFrame)(Code)
Set a local variable or parameter in the specified stack frame.
Parameters:
  index - Local variable index relative to the current stackframe bottom.NEEDSDOC @param stackFrame
Parameters:
  val - The value of the variable that is being set.



setStackFrame
public void setStackFrame(int sf)(Code)
Set the current stack frame.
Parameters:
  sf - The new stack frame position.



size
public int size()(Code)
Get size of the stack. the total size of the execution stack.



unlink
public void unlink()(Code)
Free up the stack frame that was last allocated with VariableStack.link(int size) .



unlink
public void unlink(int currentFrame)(Code)
Free up the stack frame that was last allocated with VariableStack.link(int size) .
Parameters:
  currentFrame - The current frame to set to after the unlink.



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.