Java Doc for Scope.java in  » 6.0-JDK-Modules-com.sun » tools » com » sun » tools » javac » code » 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 » 6.0 JDK Modules com.sun » tools » com.sun.tools.javac.code 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.sun.tools.javac.code.Scope

Scope
public class Scope (Code)
A scope represents an area of visibility in a Java program. The Scope class is a container for symbols which provides efficient access to symbols given their names. Scopes are implemented as hash tables. Scopes can be nested; the next field of a scope points to its next outer scope. Nested scopes can share their hash tables.

This is NOT part of any API supported by Sun Microsystems. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.


Inner Class :public static class Entry
Inner Class :public static class ImportScope extends Scope
Inner Class :public static class DelegatedScope extends Scope
Inner Class :public static class ErrorScope extends Scope

Field Summary
public  Entryelems
     A linear list that also contains all entries in reverse order of appearance (i.e later entries are pushed on top).
final public static  ScopeemptyScope
     A value for the empty scope.
 inthashMask
     Mask for hash codes, always equal to (table.length - 1).
public  intnelems
     The number of elements in this scope.
public  Scopenext
    
public  Symbolowner
     The scope's owner.
public  Entry[]table
     A hash table for the scope's entries.

Constructor Summary
 Scope(Scope next, Symbol owner, Entry[] table)
     Construct a new scope, within scope next, with given owner, using given table.
public  Scope(Symbol owner)
     Construct a new scope, within scope next, with given owner, using a fresh table of length INITIAL_SIZE.

Method Summary
public  Scopedup()
     Construct a fresh scope within this scope, with same owner, which shares its table with the outer scope.
public  Scopedup(Symbol newOwner)
     Construct a fresh scope within this scope, with new owner, which shares its table with the outer scope.
public  ScopedupUnshared()
     Construct a fresh scope within this scope, with same owner, with a new hash table, whose contents initially are those of the table of its outer scope.
public  voidenter(Symbol sym)
     Enter symbol sym in this scope.
public  voidenter(Symbol sym, Scope s)
    
public  voidenter(Symbol sym, Scope s, Scope origin)
     Enter symbol sym in this scope, but mark that it comes from given scope `s' accessed through `origin'.
public  voidenterIfAbsent(Symbol sym)
     Enter symbol sym in this scope if not already there.
public  Iterable<Symbol>getElements()
    
public  booleanincludes(Symbol c)
    
public  Scopeleave()
     Remove all entries of this scope from its table, if shared with next.
public  Entrylookup(Name name)
     Return the entry associated with given name, starting in this scope and proceeding outwards.
 EntrymakeEntry(Symbol sym, Entry shadowed, Entry sibling, Scope scope, Scope origin)
    
public  voidremove(Symbol sym)
     Remove symbol from this scope.
public  StringtoString()
    

Field Detail
elems
public Entry elems(Code)
A linear list that also contains all entries in reverse order of appearance (i.e later entries are pushed on top).



emptyScope
final public static Scope emptyScope(Code)
A value for the empty scope.



hashMask
int hashMask(Code)
Mask for hash codes, always equal to (table.length - 1).



nelems
public int nelems(Code)
The number of elements in this scope.



next
public Scope next(Code)
Next enclosing scope (with whom this scope may share a hashtable)



owner
public Symbol owner(Code)
The scope's owner.



table
public Entry[] table(Code)
A hash table for the scope's entries.




Constructor Detail
Scope
Scope(Scope next, Symbol owner, Entry[] table)(Code)
Construct a new scope, within scope next, with given owner, using given table. The table's length must be an exponent of 2.



Scope
public Scope(Symbol owner)(Code)
Construct a new scope, within scope next, with given owner, using a fresh table of length INITIAL_SIZE.




Method Detail
dup
public Scope dup()(Code)
Construct a fresh scope within this scope, with same owner, which shares its table with the outer scope. Used in connection with method leave if scope access is stack-like in order to avoid allocation of fresh tables.



dup
public Scope dup(Symbol newOwner)(Code)
Construct a fresh scope within this scope, with new owner, which shares its table with the outer scope. Used in connection with method leave if scope access is stack-like in order to avoid allocation of fresh tables.



dupUnshared
public Scope dupUnshared()(Code)
Construct a fresh scope within this scope, with same owner, with a new hash table, whose contents initially are those of the table of its outer scope.



enter
public void enter(Symbol sym)(Code)
Enter symbol sym in this scope.



enter
public void enter(Symbol sym, Scope s)(Code)



enter
public void enter(Symbol sym, Scope s, Scope origin)(Code)
Enter symbol sym in this scope, but mark that it comes from given scope `s' accessed through `origin'. The last two arguments are only used in import scopes.



enterIfAbsent
public void enterIfAbsent(Symbol sym)(Code)
Enter symbol sym in this scope if not already there.



getElements
public Iterable<Symbol> getElements()(Code)



includes
public boolean includes(Symbol c)(Code)
Given a class, is there already a class with same fully qualified name in this (import) scope?



leave
public Scope leave()(Code)
Remove all entries of this scope from its table, if shared with next.



lookup
public Entry lookup(Name name)(Code)
Return the entry associated with given name, starting in this scope and proceeding outwards. If no entry was found, return the sentinel, which is characterized by having a null in both its scope and sym fields, whereas both fields are non-null for regular entries.



makeEntry
Entry makeEntry(Symbol sym, Entry shadowed, Entry sibling, Scope scope, Scope origin)(Code)



remove
public void remove(Symbol sym)(Code)
Remove symbol from this scope. Used when an inner class attribute tells us that the class isn't a package member.



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.