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


java.lang.Object
   sun.tools.java.Imports

Imports
public class Imports implements Constants(Code)
This class describes the classes and packages imported from a source file. A Hashtable called bindings is maintained to quickly map symbol names to classes. This table is flushed everytime a new import is added. A class name is resolved as follows: - if it is a qualified name then return the corresponding class - if the name corresponds to an individually imported class then return that class - check if the class is defined in any of the imported packages, if it is then return it, make sure it is defined in only one package - assume that the class is defined in the current package WARNING: The contents of this source file are not part of any supported API. Code that depends on them does so at its own risk: they are subject to change or removal without notice.


Field Summary
protected  intchecked
    
 Hashtableclasses
     The imported classes, including memoized imports from packages.
 IdentifiercurrentPackage
     The current package, which is implicitly imported, and has precedence over other imported packages.
 longcurrentPackageWhere
     A location for the current package declaration.
 Vectorpackages
     The imported package identifiers.
 Vectorsingles
     The (originally) imported classes.

Constructor Summary
public  Imports(Environment env)
     Constructor, always import java.lang.

Method Summary
public synchronized  voidaddClass(IdentifierToken t)
    
public  voidaddClass(Identifier nm)
    
public synchronized  voidaddPackage(IdentifierToken t)
     Add a package import, or perhaps an inner class scope.
public  voidaddPackage(Identifier id)
    
public synchronized  IdentifierforceResolve(Environment env, Identifier nm)
     Suppose a resolve() call has failed.
public  IdentifiergetCurrentPackage()
    
public  ListgetImportedClasses()
     Return an unmodifiable list of IdentifierToken representing classes specified as imports.
public  ListgetImportedPackages()
     Return an unmodifiable list of IdentifierToken representing packages specified as imports.
public static  booleanimportable(Identifier id, Environment env)
     Check to see if 'id' names an importable class in `env'.
public  EnvironmentnewEnvironment(Environment env)
     Extend an environment with my resolve() method.
public synchronized  voidresolve(Environment env)
     Check the names of the imports.
public synchronized  Identifierresolve(Environment env, Identifier nm)
     Lookup a class, given the current set of imports, AmbiguousClass exception is thrown if the name can be resolved in more than one way.
public synchronized  voidsetCurrentPackage(IdentifierToken t)
     Specify the current package with an IdentifierToken.
public synchronized  voidsetCurrentPackage(Identifier id)
    

Field Detail
checked
protected int checked(Code)
Are the import names checked yet?



classes
Hashtable classes(Code)
The imported classes, including memoized imports from packages.



currentPackage
Identifier currentPackage(Code)
The current package, which is implicitly imported, and has precedence over other imported packages.



currentPackageWhere
long currentPackageWhere(Code)
A location for the current package declaration. Used to report errors against the current package.



packages
Vector packages(Code)
The imported package identifiers. This will not contain duplicate imports for the same package. It will also not contain the current package.



singles
Vector singles(Code)
The (originally) imported classes. A vector of IdentifierToken.




Constructor Detail
Imports
public Imports(Environment env)(Code)
Constructor, always import java.lang.




Method Detail
addClass
public synchronized void addClass(IdentifierToken t)(Code)
Add a class import



addClass
public void addClass(Identifier nm) throws AmbiguousClass(Code)



addPackage
public synchronized void addPackage(IdentifierToken t)(Code)
Add a package import, or perhaps an inner class scope. Ignore any duplicate imports.



addPackage
public void addPackage(Identifier id)(Code)



forceResolve
public synchronized Identifier forceResolve(Environment env, Identifier nm)(Code)
Suppose a resolve() call has failed. This routine can be used silently to give a reasonable default qualification (the current package) to the identifier. This decision is recorded for future reference.



getCurrentPackage
public Identifier getCurrentPackage()(Code)
Report the current package



getImportedClasses
public List getImportedClasses()(Code)
Return an unmodifiable list of IdentifierToken representing classes specified as imports.



getImportedPackages
public List getImportedPackages()(Code)
Return an unmodifiable list of IdentifierToken representing packages specified as imports.



importable
public static boolean importable(Identifier id, Environment env)(Code)
Check to see if 'id' names an importable class in `env'. This method was made public and static for utility.



newEnvironment
public Environment newEnvironment(Environment env)(Code)
Extend an environment with my resolve() method.



resolve
public synchronized void resolve(Environment env)(Code)
Check the names of the imports.



resolve
public synchronized Identifier resolve(Environment env, Identifier nm) throws ClassNotFound(Code)
Lookup a class, given the current set of imports, AmbiguousClass exception is thrown if the name can be resolved in more than one way. A ClassNotFound exception is thrown if the class is not found in the imported classes and packages.



setCurrentPackage
public synchronized void setCurrentPackage(IdentifierToken t)(Code)
Specify the current package with an IdentifierToken.



setCurrentPackage
public synchronized void setCurrentPackage(Identifier id)(Code)
Specify the current package



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.