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


001:        /**
002:         * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
003:         */package net.sourceforge.pmd;
004:
005:        import java.util.List;
006:        import java.util.Properties;
007:
008:        /**
009:         * This is the basic Rule interface for PMD rules.
010:         */
011:        //FUTURE Implement Cloneable and clone()
012:        public interface Rule {
013:            // FUTURE Use enum
014:            public static final int LOWEST_PRIORITY = 5;
015:
016:            // FUTURE Use enum
017:            public static final String[] PRIORITIES = { "High", "Medium High",
018:                    "Medium", "Medium Low", "Low" };
019:
020:            /**
021:             * Get the name of this Rule.
022:             */
023:            String getName();
024:
025:            /**
026:             * Set the name of this Rule.
027:             */
028:            void setName(String name);
029:
030:            /**
031:             * Get the version of PMD in which this Rule was added.
032:             * Return <code>null</code> if not applicable.
033:             */
034:            String getSince();
035:
036:            /**
037:             * Set the version of PMD in which this Rule was added.
038:             */
039:            void setSince(String since);
040:
041:            /**
042:             * Get the class of this Rule.
043:             */
044:            String getRuleClass();
045:
046:            /**
047:             * Set the class of this Rule.
048:             */
049:            void setRuleClass(String ruleClass);
050:
051:            /**
052:             * Get the name of the RuleSet containing this Rule.
053:             * 
054:             * @see RuleSet
055:             */
056:            String getRuleSetName();
057:
058:            /**
059:             * Set the name of the RuleSet containing this Rule.
060:             * 
061:             * @see RuleSet
062:             */
063:            void setRuleSetName(String name);
064:
065:            /**
066:             * Get the message to show when this Rule identifies a violation.
067:             */
068:            String getMessage();
069:
070:            /**
071:             * Set the message to show when this Rule identifies a violation.
072:             */
073:            void setMessage(String message);
074:
075:            /**
076:             * Get the description of this Rule.
077:             */
078:            String getDescription();
079:
080:            /**
081:             * Set the description of this Rule.
082:             */
083:            void setDescription(String description);
084:
085:            /**
086:             * Get the list of examples for this Rule.
087:             */
088:            List<String> getExamples();
089:
090:            /**
091:             * Still used by the JDeveloper plugin
092:             * 
093:             * @deprecated use getExamples(), since we now support multiple examples
094:             */
095:            String getExample();
096:
097:            /**
098:             * Add a single example for this Rule.
099:             */
100:            void addExample(String example);
101:
102:            /**
103:             * Get a URL for external information about this Rule.
104:             */
105:            String getExternalInfoUrl();
106:
107:            /**
108:             * Set a URL for external information about this Rule.
109:             */
110:            void setExternalInfoUrl(String externalInfoUrl);
111:
112:            /**
113:             * Get the priority of this Rule.
114:             */
115:            int getPriority();
116:
117:            /**
118:             * Set the priority of this Rule.
119:             */
120:            void setPriority(int priority);
121:
122:            /**
123:             * Get a name for the priority of this Rule.
124:             */
125:            String getPriorityName();
126:
127:            /**
128:             * TODO What is this?
129:             * 
130:             * @deprecated Don't know what this is for, so deprecating it.
131:             */
132:            boolean include();
133:
134:            /**
135:             * TODO What is this?
136:             * 
137:             * @deprecated Don't know what this is for, so deprecating it.
138:             */
139:            void setInclude(boolean include);
140:
141:            /**
142:             * Get all properties for this Rule.
143:             * 
144:             * @return the properties for the rule
145:             */
146:            Properties getProperties();
147:
148:            /**
149:             * Add a specific property to this Rule.
150:             */
151:            void addProperty(String name, String property);
152:
153:            /**
154:             * Add a set of properties to this Rule.
155:             */
156:            void addProperties(Properties properties);
157:
158:            /**
159:             * Get whether this Rule has a property of the given name.
160:             */
161:            boolean hasProperty(String name);
162:
163:            /**
164:             * Get the <code>boolean</code> value for the given property.
165:             */
166:            boolean getBooleanProperty(String name);
167:
168:            /**
169:             * Get the <code>int</code> value for the given property.
170:             */
171:            int getIntProperty(String name);
172:
173:            /**
174:             * Get the <code>double</code> value for the given property.
175:             */
176:            double getDoubleProperty(String name);
177:
178:            /**
179:             * Get the <code>java.util.String</code> value for the given property.
180:             */
181:            String getStringProperty(String name);
182:
183:            /**
184:             * Get the PropertyDescriptor for the given property.
185:             */
186:            // FUTURE Rename to getPropertyDescriptor(String)
187:            PropertyDescriptor propertyDescriptorFor(String name);
188:
189:            /**
190:             * Sets whether this Rule uses Data Flow Analysis.
191:             */
192:            // FUTURE Use JavaBean conventions for boolean attributes
193:            void setUsesDFA();
194:
195:            /**
196:             * Gets whether this Rule uses Data Flow Analysis.
197:             */
198:            // FUTURE Use JavaBean conventions for boolean attributes
199:            boolean usesDFA();
200:
201:            /**
202:             * Sets whether this Rule uses Type Resolution.
203:             */
204:            // FUTURE Use JavaBean conventions for boolean attributes
205:            void setUsesTypeResolution();
206:
207:            /**
208:             * Gets whether this Rule uses Type Resolution.
209:             */
210:            // FUTURE Use JavaBean conventions for boolean attributes
211:            boolean usesTypeResolution();
212:
213:            /**
214:             * Gets whether this Rule uses the RuleChain.
215:             */
216:            // FUTURE Use JavaBean conventions for boolean attributes
217:            boolean usesRuleChain();
218:
219:            /**
220:             * Gets the collection of AST node names visited by the Rule on the
221:             * RuleChain.
222:             */
223:            List<String> getRuleChainVisits();
224:
225:            /**
226:             * Adds an AST node name to be visited by the Rule on the RuleChain.
227:             */
228:            void addRuleChainVisit(String astNodeName);
229:
230:            /**
231:             * Start processing. Called once, before apply() is first called. 
232:             */
233:            void start(RuleContext ctx);
234:
235:            /**
236:             * Apply this rule to the given collection of compilation units, using the
237:             * given context.
238:             */
239:            void apply(List<?> astCompilationUnits, RuleContext ctx);
240:
241:            /**
242:             * End processing. Called once, after apply() is last called. 
243:             */
244:            void end(RuleContext ctx);
245:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.