Source Code Cross Referenced for ASTFieldDeclaration.java in  » Code-Analyzer » pmd-4.2rc1 » net » sourceforge » pmd » 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 » Code Analyzer » pmd 4.2rc1 » net.sourceforge.pmd.ast 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* Generated By:JJTree: Do not edit this line. ASTFieldDeclaration.java */
002:
003:        package net.sourceforge.pmd.ast;
004:
005:        public class ASTFieldDeclaration extends SimpleJavaAccessTypeNode
006:                implements  Dimensionable {
007:
008:            public ASTFieldDeclaration(int id) {
009:                super (id);
010:            }
011:
012:            public ASTFieldDeclaration(JavaParser p, int id) {
013:                super (p, id);
014:            }
015:
016:            /**
017:             * Accept the visitor. *
018:             */
019:            public Object jjtAccept(JavaParserVisitor visitor, Object data) {
020:                return visitor.visit(this , data);
021:            }
022:
023:            public boolean isSyntacticallyPublic() {
024:                return super .isPublic();
025:            }
026:
027:            public boolean isPublic() {
028:                if (isInterfaceMember()) {
029:                    return true;
030:                }
031:                return super .isPublic();
032:            }
033:
034:            public boolean isSyntacticallyStatic() {
035:                return super .isStatic();
036:            }
037:
038:            public boolean isStatic() {
039:                if (isInterfaceMember()) {
040:                    return true;
041:                }
042:                return super .isStatic();
043:            }
044:
045:            public boolean isSyntacticallyFinal() {
046:                return super .isFinal();
047:            }
048:
049:            public boolean isFinal() {
050:                if (isInterfaceMember()) {
051:                    return true;
052:                }
053:                return super .isFinal();
054:            }
055:
056:            public boolean isPrivate() {
057:                if (isInterfaceMember()) {
058:                    return false;
059:                }
060:                return super .isPrivate();
061:            }
062:
063:            public boolean isPackagePrivate() {
064:                if (isInterfaceMember()) {
065:                    return false;
066:                }
067:                return super .isPackagePrivate();
068:            }
069:
070:            public boolean isProtected() {
071:                if (isInterfaceMember()) {
072:                    return false;
073:                }
074:                return super .isProtected();
075:            }
076:
077:            public boolean isInterfaceMember() {
078:                if (jjtGetParent().jjtGetParent() instanceof  ASTEnumBody) {
079:                    return false;
080:                }
081:                ASTClassOrInterfaceDeclaration n = getFirstParentOfType(ASTClassOrInterfaceDeclaration.class);
082:                return n != null && n.isInterface();
083:            }
084:
085:            public boolean isArray() {
086:                return checkType() + checkDecl() > 0;
087:            }
088:
089:            public int getArrayDepth() {
090:                if (!isArray()) {
091:                    return 0;
092:                }
093:                return checkType() + checkDecl();
094:            }
095:
096:            private int checkType() {
097:                if (jjtGetNumChildren() == 0
098:                        || !(jjtGetChild(0) instanceof  ASTType)) {
099:                    return 0;
100:                }
101:                return ((ASTType) jjtGetChild(0)).getArrayDepth();
102:            }
103:
104:            private int checkDecl() {
105:                if (jjtGetNumChildren() < 2
106:                        || !(jjtGetChild(1) instanceof  ASTVariableDeclarator)) {
107:                    return 0;
108:                }
109:                return ((ASTVariableDeclaratorId) (jjtGetChild(1)
110:                        .jjtGetChild(0))).getArrayDepth();
111:            }
112:
113:            public void dump(String prefix) {
114:                String out = collectDumpedModifiers(prefix);
115:                if (isArray()) {
116:                    out += "(array";
117:                    for (int i = 0; i < getArrayDepth(); i++) {
118:                        out += "[";
119:                    }
120:                    out += ")";
121:                }
122:                System.out.println(out);
123:                dumpChildren(prefix);
124:            }
125:
126:            /**
127:             * Gets the variable name of this field.
128:             * This method searches the first VariableDeclartorId node and returns it's image or <code>null</code> if the child node is not found.
129:             *
130:             * @return a String representing the name of the variable
131:             */
132:            public String getVariableName() {
133:                ASTVariableDeclaratorId decl = getFirstChildOfType(ASTVariableDeclaratorId.class);
134:                if (decl != null) {
135:                    return decl.getImage();
136:                }
137:                return null;
138:            }
139:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.