Java Doc for Scope.java in  » Template-Engine » Tea » com » go » tea » 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 » Template Engine » Tea » com.go.tea.compiler 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.go.tea.compiler.Scope

Scope
public class Scope (Code)
A Scope encapsulates a set of declared variables and references to them. Scopes can be nested, and child scopes have access to variables in the parent scope.
author:
   Brian S O'Neill
version:
   28 , 00/11/16



Constructor Summary
public  Scope()
    
public  Scope(Scope parent)
    

Method Summary
public  booleanbindToVariable(VariableRef ref)
     Attempt to bind variable reference to a variable in this scope or a parent scope.
public  VariabledeclareVariable(Variable var)
     Declare a variable for use in this scope.
public  VariabledeclareVariable(Variable var, boolean isPrivate)
     Declare a variable for use in this scope.
public  voiddeclareVariables(Variable[] vars)
     Declare new variables in this scope.
public  voiddelete()
     Delete this scope by detaching it from its parent.
public  Scope[]getChildren()
     Returns an empty array if this scope has no children.
public  VariablegetDeclaredVariable(String name)
     Returns a declared variable by name.
public  VariablegetDeclaredVariable(String name, boolean publicOnly)
     Returns a declared variable by name.
public  ScopegetEnclosingScope(Scope scope)
     Returns the innermost enclosing scope of this and the one given.
public  VariableRef[]getLocalOutOfScopeVariableRefs()
     Returns all the references made from this scope to variables declared outside of this scope.
public  VariableRef[]getLocalVariableRefs()
     Returns all the references made from this scope to variables declared in this scope or in a parent.
public  VariableRef[]getOutOfScopeVariableRefs()
     Returns all the references made from this scope and all child scopes to variables declared outside of this scope.
public  ScopegetParent()
     Returns null if this scope has no parent.
public  VariableRef[]getVariableRefs()
     Returns all the variable references made from this scope and all child scopes.
public  Variable[]intersect(Scope scope)
     Returns the intersection of this scope against the one given.
public  booleanisEnclosing(Scope scope)
     Returns true if this scope is the same as or a parent of the one given.
public  Variable[]promote()
     Returns variables to promote from this scope to a parent scope. Promote is similar to intersect, except it operates on this scope and its parent (if it has one).

The list may contain undeclared variables, and so all returned variables must be re-declared in a common parent scope.

public  StringtoString()
    


Constructor Detail
Scope
public Scope()(Code)



Scope
public Scope(Scope parent)(Code)




Method Detail
bindToVariable
public boolean bindToVariable(VariableRef ref)(Code)
Attempt to bind variable reference to a variable in this scope or a parent scope. If the variable to bind to isn't available or doesn't exist, false is returned. true if reference has been bound



declareVariable
public Variable declareVariable(Variable var)(Code)
Declare a variable for use in this scope. If no variable of this name and type has been defined, it is added to the shared set of pooled variables. Returns the actual Variable object that should be used.



declareVariable
public Variable declareVariable(Variable var, boolean isPrivate)(Code)
Declare a variable for use in this scope. If no variable of this name and type has been defined, it is added to the shared set of pooled variables. Returns the actual Variable object that should be used instead.
Parameters:
  isPrivate - when true, variable declaration doesn't leave thisscope during an intersection or promotion



declareVariables
public void declareVariables(Variable[] vars)(Code)
Declare new variables in this scope. Entries in the array are replaced with actual Variable objects that should be used instead.



delete
public void delete()(Code)
Delete this scope by detaching it from its parent.



getChildren
public Scope[] getChildren()(Code)
Returns an empty array if this scope has no children.



getDeclaredVariable
public Variable getDeclaredVariable(String name)(Code)
Returns a declared variable by name. Search begins in this scope and moves up into parent scopes. If not found, null is returned. The returned variable may be private or public to a scope. Null if no declared variable found with the given name



getDeclaredVariable
public Variable getDeclaredVariable(String name, boolean publicOnly)(Code)
Returns a declared variable by name. Search begins in this scope and moves up into parent scopes. If not found, null is returned. A public- only variable can be requested. Null if no declared variable found with the given name



getEnclosingScope
public Scope getEnclosingScope(Scope scope)(Code)
Returns the innermost enclosing scope of this and the one given. If no enclosing scope exists, null is returned.



getLocalOutOfScopeVariableRefs
public VariableRef[] getLocalOutOfScopeVariableRefs()(Code)
Returns all the references made from this scope to variables declared outside of this scope.



getLocalVariableRefs
public VariableRef[] getLocalVariableRefs()(Code)
Returns all the references made from this scope to variables declared in this scope or in a parent. non-null array of VariableRefs.



getOutOfScopeVariableRefs
public VariableRef[] getOutOfScopeVariableRefs()(Code)
Returns all the references made from this scope and all child scopes to variables declared outside of this scope.



getParent
public Scope getParent()(Code)
Returns null if this scope has no parent.



getVariableRefs
public VariableRef[] getVariableRefs()(Code)
Returns all the variable references made from this scope and all child scopes. non-null array of VariableRefs.



intersect
public Variable[] intersect(Scope scope)(Code)
Returns the intersection of this scope against the one given. An intersection operates on each scope's locally declared variables, producing a list of variables that both scopes may inherit.

The list may contain undeclared variables, and so all returned variables must be re-declared in a common parent scope. This responsibility is left to the caller, intersect does not alter the internal state of either scope.

This method is designed specifically for combining the locally declared variables of the "then" and "else" parts of an if statement. variables representing the intersection




isEnclosing
public boolean isEnclosing(Scope scope)(Code)
Returns true if this scope is the same as or a parent of the one given.



promote
public Variable[] promote()(Code)
Returns variables to promote from this scope to a parent scope. Promote is similar to intersect, except it operates on this scope and its parent (if it has one).

The list may contain undeclared variables, and so all returned variables must be re-declared in a common parent scope. This responsibility is left to the caller, promote does not alter the internal state of this scope or its parent.

This method is designed specifically for promoting the locally declared variables of a loop statement's body. variables to promote




toString
public String toString()(Code)



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.