Clover Coverage Report - Checkstyle
Coverage timestamp: Fri May 9 2008 10:48:13 EST
../../../../../../img/srcFileCovDistChart10.png 0% of files have more coverage
249   955   126   7.78
148   549   0.51   16
32     3.94  
2    
 
  JavadocMethodCheck       Line # 52 95.2% 0.9522673
122.59 244 121 121 0.5
  JavadocMethodCheck.ExceptionInfo       Line # 913 100% 1.0
5 5 5 5 1
 
  ( 10 of 25)
 
1    ////////////////////////////////////////////////////////////////////////////////
2    // checkstyle: Checks Java source code for adherence to a set of rules.
3    // Copyright (C) 2001-2005 Oliver Burn
4    //
5    // This library is free software; you can redistribute it and/or
6    // modify it under the terms of the GNU Lesser General Public
7    // License as published by the Free Software Foundation; either
8    // version 2.1 of the License, or (at your option) any later version.
9    //
10    // This library is distributed in the hope that it will be useful,
11    // but WITHOUT ANY WARRANTY; without even the implied warranty of
12    // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13    // Lesser General Public License for more details.
14    //
15    // You should have received a copy of the GNU Lesser General Public
16    // License along with this library; if not, write to the Free Software
17    // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18    ////////////////////////////////////////////////////////////////////////////////
19    package com.puppycrawl.tools.checkstyle.checks.javadoc;
20   
21    import java.util.ArrayList;
22    import java.util.HashSet;
23    import java.util.Iterator;
24    import java.util.List;
25    import java.util.ListIterator;
26    import java.util.Set;
27   
28    import java.util.regex.Matcher;
29    import java.util.regex.Pattern;
30   
31    import antlr.collections.AST;
32   
33    import com.puppycrawl.tools.checkstyle.api.DetailAST;
34    import com.puppycrawl.tools.checkstyle.api.FileContents;
35    import com.puppycrawl.tools.checkstyle.api.FullIdent;
36    import com.puppycrawl.tools.checkstyle.api.Scope;
37    import com.puppycrawl.tools.checkstyle.api.ScopeUtils;
38    import com.puppycrawl.tools.checkstyle.api.TextBlock;
39    import com.puppycrawl.tools.checkstyle.api.TokenTypes;
40    import com.puppycrawl.tools.checkstyle.api.Utils;
41    import com.puppycrawl.tools.checkstyle.checks.AbstractTypeAwareCheck;
42    import com.puppycrawl.tools.checkstyle.checks.CheckUtils;
43   
44    /**
45    * Checks the Javadoc of a method or constructor.
46    *
47    * @author Oliver Burn
48    * @author Rick Giles
49    * @author o_sukhodoslky
50    * @version 1.1
51    */
 
52    public class JavadocMethodCheck extends AbstractTypeAwareCheck
53    {
54    /** the pattern to match Javadoc tags that take an argument * */
55    private static final String MATCH_JAVADOC_ARG_PAT =
56    "@(throws|exception|param)\\s+(\\S+)\\s+\\S";
57    /** compiled regexp to match Javadoc tags that take an argument * */
58    private static final Pattern MATCH_JAVADOC_ARG = Utils
59    .createPattern(MATCH_JAVADOC_ARG_PAT);
60   
61    /**
62    * the pattern to match the first l