Java Doc for Env.java in  » EJB-Server-resin-3.1.5 » resin » com » caucho » 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 » EJB Server resin 3.1.5 » resin » com.caucho.xpath 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.caucho.xpath.Env

Env
public class Env implements ExprEnvironment(Code)
Global and local variable environment. The April XSLT draft introduces global and local variables. The Env class contains those bindings.

Because this class exists only to support XSL, it makes a number of assumptions that would be invalid for a typical API. Specifically, the variable names must be interned strings, i.e. variable matching uses '==', not equals.

Local variables are handled like a stack. They are pushed and popped as necessary. The top variables shadow bottom variables.

In other words, although the API somewhat resembles a HashMap, it can't be used as a generic hash map.



Field Summary
 HashMap_cache
    
static  FreeList<Env>_freeList
    
 HashMap_functions
    
 HashMap<String, Var>_globals
    
 HashMap_idCache
    
 HashMap_ids
    
 Element_lastElement
    
 String[]_varKeys
    
 int_varSize
    
 Var[]_varValues
    


Method Summary
public  voidaddFunction(String name, Object fun)
    
public  intaddVar(String name, Object value)
     Adds the value associated with name.
public  intaddVar(String name, Var value)
     Adds the value associated with name.
public  voidclear()
     Clears all values in the local environment.
static  Envcreate()
    
public  voidfree()
    
public  ObjectgetCache(Object key)
    
public  NodegetContextNode()
     Gets the context node.
public  intgetContextPosition()
     Returns the position of the context node.
public  intgetContextSize()
     Returns the number of nodes in the context list.
public  NodegetCurrentNode()
     Gets the current node.
public  ExprEnvironmentgetExprEnv()
    
public  XPathFungetFunction(String name)
     Returns the named function.
public  DocumentgetOwnerDocument()
     Returns a document for creating nodes.
 EnvgetParent()
     Returns the parent envivonment.
public  intgetPositionIndex()
    
public  AbstractPatterngetSelect()
    
public  StylesheetEnvgetStylesheetEnv()
    
public  intgetTop()
     Returns the top of the stack.
public  intgetUseCount()
    
public  VargetVar(String name)
     Returns the value associated with name.
public  VarEnvgetVarEnv()
     Returns the variable environment.
public  intgetVarSize()
     Returns the current number of local variables.
public  booleanhasMorePositions()
     Returns true if there are more positions() needed to iterate through.
 voidinit(Env parent)
     Initialize the XPath environment with values from the parent.
 voidinit(Env parent, AbstractPattern select, Node currentNode)
     Initialize the XPath environment with a context and a select node.
 voidinitMacro(Env parent)
     Initialize the XPath environment with values from the parent.
public  voidpopToTop(int top)
     Pops the last count vars from the local stack.
public  voidpopVars(int count)
     Pops the last count vars from the local stack.
public  voidsetCache(Object key, Object value)
    
public  NodesetContextNode(Node contextNode)
     Sets the context node.
public  intsetContextPosition(int position)
    
public  intsetContextSize(int size)
     Sets the context size to a know value.
public  voidsetCurrentNode(Node node)
     Sets the current node.
public  ExprEnvironmentsetExprEnv(ExprEnvironment exprEnv)
    
public  HashMapsetFunctions(HashMap functions)
    
public  voidsetGlobal(String name, Object value)
     Sets a global variable.
public  booleansetMorePositions(boolean more)
     Set true if there are more positions() needed to iterate through.
Parameters:
  more - if true, there are more positions to iterate through.
public  voidsetPosition(int position)
    
public  intsetPositionIndex(int index)
    
public  AbstractPatternsetSelect(Node node, AbstractPattern select)
    
public  voidsetStylesheetEnv(StylesheetEnv stylesheetEnv)
    
public  voidsetVar(String name, Object value)
     Sets the value associated with name.
public  voidsetVarEnv(VarEnv varEnv)
     Sets the variable environment.
public  voidsetVarSize(int size)
     Sets the current number of local variables (popping, them).
public  StringstringValue(Node node)
     Returns the string-value of the node.
public  ObjectsystemProperty(String namespaceURI, String localName)
     Returns the given system property.

Field Detail
_cache
HashMap _cache(Code)



_freeList
static FreeList<Env> _freeList(Code)



_functions
HashMap _functions(Code)



_globals
HashMap<String, Var> _globals(Code)



_idCache
HashMap _idCache(Code)



_ids
HashMap _ids(Code)



_lastElement
Element _lastElement(Code)



_varKeys
String[] _varKeys(Code)



_varSize
int _varSize(Code)



_varValues
Var[] _varValues(Code)





Method Detail
addFunction
public void addFunction(String name, Object fun)(Code)
Adds and extension function
Parameters:
  function - new function library old function library



addVar
public int addVar(String name, Object value)(Code)
Adds the value associated with name.

name must be interned




addVar
public int addVar(String name, Var value)(Code)
Adds the value associated with name.

name must be interned




clear
public void clear()(Code)
Clears all values in the local environment.



create
static Env create()(Code)



free
public void free()(Code)



getCache
public Object getCache(Object key)(Code)



getContextNode
public Node getContextNode()(Code)
Gets the context node.



getContextPosition
public int getContextPosition()(Code)
Returns the position of the context node.



getContextSize
public int getContextSize()(Code)
Returns the number of nodes in the context list.



getCurrentNode
public Node getCurrentNode()(Code)
Gets the current node.



getExprEnv
public ExprEnvironment getExprEnv()(Code)



getFunction
public XPathFun getFunction(String name)(Code)
Returns the named function.



getOwnerDocument
public Document getOwnerDocument()(Code)
Returns a document for creating nodes.



getParent
Env getParent()(Code)
Returns the parent envivonment.



getPositionIndex
public int getPositionIndex()(Code)



getSelect
public AbstractPattern getSelect()(Code)



getStylesheetEnv
public StylesheetEnv getStylesheetEnv()(Code)



getTop
public int getTop()(Code)
Returns the top of the stack.



getUseCount
public int getUseCount()(Code)



getVar
public Var getVar(String name)(Code)
Returns the value associated with name.

name must be interned




getVarEnv
public VarEnv getVarEnv()(Code)
Returns the variable environment.



getVarSize
public int getVarSize()(Code)
Returns the current number of local variables.



hasMorePositions
public boolean hasMorePositions()(Code)
Returns true if there are more positions() needed to iterate through.



init
void init(Env parent)(Code)
Initialize the XPath environment with values from the parent.



init
void init(Env parent, AbstractPattern select, Node currentNode)(Code)
Initialize the XPath environment with a context and a select node.



initMacro
void initMacro(Env parent)(Code)
Initialize the XPath environment with values from the parent.



popToTop
public void popToTop(int top)(Code)
Pops the last count vars from the local stack.



popVars
public void popVars(int count)(Code)
Pops the last count vars from the local stack.



setCache
public void setCache(Object key, Object value)(Code)



setContextNode
public Node setContextNode(Node contextNode)(Code)
Sets the context node.



setContextPosition
public int setContextPosition(int position)(Code)



setContextSize
public int setContextSize(int size)(Code)
Sets the context size to a know value.



setCurrentNode
public void setCurrentNode(Node node)(Code)
Sets the current node.



setExprEnv
public ExprEnvironment setExprEnv(ExprEnvironment exprEnv)(Code)
Sets the selection context



setFunctions
public HashMap setFunctions(HashMap functions)(Code)
Sets the extension function library
Parameters:
  function - new function library old function library



setGlobal
public void setGlobal(String name, Object value)(Code)
Sets a global variable.



setMorePositions
public boolean setMorePositions(boolean more)(Code)
Set true if there are more positions() needed to iterate through.
Parameters:
  more - if true, there are more positions to iterate through. the old more-position value.



setPosition
public void setPosition(int position)(Code)



setPositionIndex
public int setPositionIndex(int index)(Code)



setSelect
public AbstractPattern setSelect(Node node, AbstractPattern select)(Code)
Sets the selection context



setStylesheetEnv
public void setStylesheetEnv(StylesheetEnv stylesheetEnv)(Code)



setVar
public void setVar(String name, Object value)(Code)
Sets the value associated with name.

name must be interned




setVarEnv
public void setVarEnv(VarEnv varEnv)(Code)
Sets the variable environment.



setVarSize
public void setVarSize(int size)(Code)
Sets the current number of local variables (popping, them).



stringValue
public String stringValue(Node node)(Code)
Returns the string-value of the node.



systemProperty
public Object systemProperty(String namespaceURI, String localName)(Code)
Returns the given system property.



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.