1 package com.puppycrawl.tools.checkstyle.checks.javadoc; 20 21 25 class JavadocTag 26 { 27 28 private final int mLineNo; 29 30 private int mColumnNo; 31 32 private final String mTag; 33 34 private final String mArg1; 35 36 43 JavadocTag(int aLine, int aColumn, String aTag, String aArg1) 44 { 45 mLineNo = aLine; 46 mColumnNo = aColumn; 47 mTag = aTag; 48 mArg1 = aArg1; 49 } 50 51 57 JavadocTag(int aLine, int aColumn, String aTag) 58 { 59 this(aLine, aColumn, aTag, null); 60 } 61 62 63 String getTag() 64 { 65 return mTag; 66 } 67 68 69 String getArg1() 70 { 71 return mArg1; 72 } 73 74 75 int getLineNo() 76 { 77 return mLineNo; 78 } 79 80 81 int getColumnNo() 82 { 83 return mColumnNo; 84 } 85 86 87 public String toString() 88 { 89 return "{Tag = '" + getTag() + "', lineNo = " + getLineNo() 90 + ", columnNo=" + mColumnNo + ", Arg1 = '" + getArg1() + "'}"; 91 } 92 93 94 boolean isAuthorTag() 95 { 96 return "author".equals(getTag()); 97 } 98 99 100 boolean isReturnTag() 101 { 102 return "return".equals(getTag()); 103 } 104 105 106 boolean isParamTag() 107 { 108 return "param".equals(getTag()); 109 } 110 111 112 boolean isThrowsTag() 113 { 114 return ("throws".equals(getTag()) || "exception".equals(getTag())); 115 } 116 117 118 boolean isSeeOrInheritDocTag() 119 { 120 return ("see".equals(getTag()) || isInheritDocTag()); 121 } 122 123 124 boolean isInheritDocTag() 125 { 126 return "inheritDoc".equals(getTag()); 127 } 128 } 129 130 | Popular Tags |