Source Code Cross Referenced for InputJavadocStyleCheck.java in  » Code-Analyzer » checkstyle » com » puppycrawl » tools » checkstyle » 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 » checkstyle » com.puppycrawl.tools.checkstyle 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        ////////////////////////////////////////////////////////////////////////////////
002:        // Test case file for checkstyle.
003:        // Created: 2003
004:        ////////////////////////////////////////////////////////////////////////////////
005:
006:        package com.puppycrawl.tools.checkstyle;
007:
008:        /**
009:         * Test input for the JavadocStyleCheck.  This check is used to perform 
010:         * some additional Javadoc validations.  
011:         * 
012:         * @author Chris Stillwell
013:         * @version 1.0
014:         */
015:        public class InputJavadocStyleCheck {
016:            // This is OK. We don't flag missing javadoc.  That's left for other checks.
017:            private String first;
018:
019:            /** This Javadoc is missing an ending period */
020:            private String second;
021:
022:            /**
023:             * We don't want {@link com.puppycrawl.tools.checkstyle.checks.JavadocStyleCheck} 
024:             * tags to stop the scan for the end of sentence. 
025:             * @see Somthing
026:             */
027:            public InputJavadocStyleCheck() {
028:            }
029:
030:            /**
031:             * This is ok!
032:             */
033:            private void method1() {
034:            }
035:
036:            /**
037:             * This is ok?
038:             */
039:            private void method2() {
040:            }
041:
042:            /**
043:             * And This is ok.<br>
044:             */
045:            private void method3() {
046:            }
047:
048:            /**
049:             * This should fail even.though.there are embedded periods
050:             */
051:            private void method4() {
052:            }
053:
054:            /**
055:             * Test HTML in Javadoc comment
056:             * <dl>
057:             * <dt><b>This guy is missing end of bold tag
058:             * <dd>The dt and dd don't require end tags.
059:             * </dl>
060:             * </td>Extra tag shouldn't be here
061:             * 
062:             * @param arg1 <code>dummy.
063:             */
064:            private void method5(int arg1) {
065:            }
066:
067:            /**
068:             * Protected check <b>should fail
069:             */
070:            protected void method6() {
071:            }
072:
073:            /**
074:             * Package protected check <b>should fail
075:             */
076:            void method7() {
077:            }
078:
079:            /**
080:             * Public check should fail</code>
081:             * should fail <
082:             */
083:            public void method8() {
084:            }
085:
086:            /** {@inheritDoc} **/
087:            public void method9() {
088:            }
089:
090:            // Testcases to excercize the Tag parser (bug 843887)
091:
092:            /**
093:             * Real men don't use XHTML.
094:             * <br />
095:             * <hr/>
096:             * < br/>
097:             * <img src="schattenparker.jpg"/></img>
098:             */
099:            private void method10() { // </img> should be the only error
100:            }
101:
102:            /**
103:             * Tag content can be really mean.
104:             * <p>
105:             * Sometimes a p tag is closed.
106:             * </p>
107:             * <p>
108:             * Sometimes it's not.
109:             * 
110:             * <span style="font-family:'Times New Roman',Times,serif;font-size:200%">
111:             * Attributes can contain spaces and nested quotes.
112:             * </span>
113:             * <img src="slashesCanOccurWithin/attributes.jpg"/>
114:             * <img src="slashesCanOccurWithin/attributes.jpg">
115:             * <!-- comments <div> should not be checked. -->
116:             */
117:            private void method11() { // JavadocStyle should not report any error for this method
118:            }
119:
120:            /**
121:             * Tags for two lines.
122:             * <a href="some_link"
123:             * >Link Text</a>
124:             */
125:            private void method12() {// JavadocStyle should not report any error for this method
126:            }
127:
128:            /**
129:             * First sentence.
130:             * <pre>
131:             * +--LITERAL_DO (do)
132:             *     |
133:             *     +--SLIST ({)
134:             *         |
135:             *         +--EXPR
136:             *             |
137:             *             +--ASSIGN (=)
138:             *                 |
139:             *                 +--IDENT (x)
140:             *                 +--METHOD_CALL (()
141:             *                     |
142:             *                     +--DOT (.)
143:             *                         |
144:             *                         +--IDENT (rand)
145:             *                         +--IDENT (nextInt)
146:             *                     +--ELIST
147:             *                         |
148:             *                         +--EXPR
149:             *                             |
150:             *                             +--NUM_INT (10)
151:             *                     +--RPAREN ())
152:             *         +--SEMI (;)
153:             *         +--RCURLY (})
154:             *     +--LPAREN (()
155:             *     +--EXPR
156:             *         |
157:             *         +--LT (<)
158:             *             |
159:             *             +--IDENT (x)
160:             *             +--NUM_INT (5)
161:             *     +--RPAREN ())
162:             *     +--SEMI (;)
163:             * </pre>
164:             */
165:            private void method13() {// JavadocStyle should not report any error for this method
166:            }
167:
168:            /**
169:             * Some problematic javadoc. Sample usage:
170:             * <blockquote>
171:             */
172:
173:            private void method14() { // empty line between javadoc and method is critical (bug 841942)
174:            }
175:
176:            /**
177:             * Empty line between javadoc and method declaration cause wrong
178:             * line number for reporting error (bug 841942)
179:             */
180:
181:            private void method15() { // should report unended first sentance (check line number of the error)
182:            }
183:
184:            /** Description of field: {@value}. */
185:            public static final int dummy = 4911;
186:
187:            /**
188:             */
189:            public void method16() { // should report empty javadoc
190:            }
191:
192:            /**
193:             * @param a A parameter
194:             */
195:            protected void method17(String a) { // should report empty javadoc (no text before parameter)
196:            }
197:
198:            /**
199:             * @exception RuntimeException shoul be thrown
200:             */
201:            void method18(String a) { // should report empty javadoc (no text before exception)
202:            }
203:
204:            /** 
205:             */
206:            private static int ASDF = 0;
207:
208:            // should report empty javdoc
209:
210:            /** @see java.lang.Object */
211:            public void method19() { // should report empty javadoc (no text before see tag)
212:            }
213:
214:            public enum Test
215:            //Should complain about no javadoc
216:            {
217:                /**
218:                 * Value 1 without a period
219:                 */
220:                value1,
221:
222:                /**
223:                 * Value 2 with a period.
224:                 */
225:                value2,
226:            }
227:
228:            /**
229:             * A test class.
230:             * @param <T1> this is NOT an unclosed T1 tag
231:             * @author <a href="mailto:foo@nomail.com">Foo Bar</a>
232:             */
233:            public class TestClass<T1> {
234:                /**
235:                 * Retrieves X.
236:                 * @return a value
237:                 */
238:                public T1 getX() {
239:                    return null;
240:                }
241:
242:                /**
243:                 * Retrieves Y.
244:                 * @param <V> this is not an unclosed V tag
245:                 * @return a value
246:                 */
247:                public <V> V getY() {
248:                    return null;
249:                }
250:            }
251:
252:            /**
253:             * Checks if the specified IClass needs to be
254:             * annotated with the @Type annotation.
255:             */
256:            public void foo_1291847_1() {
257:            }
258:
259:            /**
260:             * Returns the string containing the properties of
261:             * <code>@Type</code> annotation.
262:             */
263:            public void foo_1291847_2() {
264:            }
265:
266:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.