Source Code Cross Referenced for ASTImportDeclaration.java in  » UML » jrefactory » net » sourceforge » jrefactory » ast » 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 » UML » jrefactory » net.sourceforge.jrefactory.ast 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *  Author:  Mike Atkinson
003:         *
004:         *  This software has been developed under the copyleft
005:         *  rules of the GNU General Public License.  Please
006:         *  consult the GNU General Public License for more
007:         *  details about use and distribution of this software.
008:         */
009:        package net.sourceforge.jrefactory.ast;
010:
011:        import net.sourceforge.jrefactory.parser.JavaParser;
012:        import net.sourceforge.jrefactory.parser.JavaParserVisitor;
013:
014:        /**
015:         *  Stores an import declaration that appears at the beginning of a java file.
016:         *
017:         * @author    Mike Atkinson
018:         * @since     jRefactory 2.9.0, created October 16, 2003
019:         */
020:        public class ASTImportDeclaration extends SimpleNode {
021:            private boolean importPackage;
022:            private boolean staticImport;// JDK 1.5
023:
024:            /**
025:             *  Constructor for the ASTImportDeclaration node.
026:             *
027:             * @param  identifier  The id of this node (JJTIMPORTDECLARATION).
028:             */
029:            public ASTImportDeclaration(int identifier) {
030:                super (identifier);
031:            }
032:
033:            /**
034:             *  Constructor for the ASTImportDeclaration node.
035:             *
036:             * @param  parser      The JavaParser that created this ASTImportDeclaration node.
037:             * @param  identifier  The id of this node (JJTIMPORTDECLARATION).
038:             */
039:            public ASTImportDeclaration(JavaParser parser, int identifier) {
040:                super (parser, identifier);
041:            }
042:
043:            /**
044:             *  Set when including everything in a package
045:             *
046:             * @param  way  <code>true</code> if we are importing the package.
047:             */
048:            public void setImportPackage(boolean way) {
049:                importPackage = way;
050:            }
051:
052:            /**
053:             *  Set when including everything in a package. JDK 1.5 indicate that this is a static import.
054:             *
055:             * @param  isStatic  <code>true</code> if we are importing statics from the package
056:             * @since            JRefactory 2.7.00
057:             */
058:            public void setStaticImport(boolean isStatic) {
059:                staticImport = isStatic;
060:            }
061:
062:            /**
063:             *  Return whether we are importing a package
064:             *
065:             * @return    <code>true</code> if the whole package is being imported (with ".*;").
066:             */
067:            public boolean isImportingPackage() {
068:                return importPackage;
069:            }
070:
071:            /**
072:             *  Return whether we are importing a the static from this package. JDK 1.5
073:             *
074:             * @return    <code>true</code> if we are importing statics from the package
075:             * @since     JRefactory 2.7.00
076:             */
077:            public boolean isStaticImport() {
078:                return staticImport;
079:            }
080:
081:            /**
082:             *  Gets the importOnDemand attribute of the ASTImportDeclaration node.
083:             *
084:             * @return    <code>true</code> if the whole package was imported (with ".*;").
085:             */
086:            public boolean isImportOnDemand() {
087:                return importPackage;
088:            }
089:
090:            /**
091:             *  Gets the importedNameNode attribute of the ASTImportDeclaration node.
092:             *
093:             * @return    The name of the class or package being imported.
094:             */
095:            public ASTName getImportedNameNode() {
096:                return (ASTName) jjtGetFirstChild();
097:            }
098:
099:            /**
100:             *  Accept the visitor.
101:             *
102:             * @param  visitor  An implementation of JavaParserVisitor that processes the ASTImportDeclaration node.
103:             * @param  data     Some data being passed between the visitor methods.
104:             * @return          Usually the data parameter (possibly modified).
105:             */
106:            public Object jjtAccept(JavaParserVisitor visitor, Object data) {
107:                return visitor.visit(this, data);
108:            }
109:
110:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.