Get rid of needless javadoc.
This commit is contained in:
parent
19fded2639
commit
315033ff56
|
|
@ -247,11 +247,6 @@ public class CheckStyleTask extends Task
|
|||
// The doers
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* Actually checks the files specified. All errors are reported to
|
||||
* System.out. Will fail if any errors occurred.
|
||||
* @throws BuildException an error occurred
|
||||
*/
|
||||
@Override
|
||||
public void execute() throws BuildException
|
||||
{
|
||||
|
|
|
|||
|
|
@ -124,14 +124,6 @@ public class Checker extends AutomaticBean
|
|||
mChildContext = context;
|
||||
}
|
||||
|
||||
/**
|
||||
* Instantiates, configures and registers a child AbstractFilter
|
||||
* or FileSetCheck
|
||||
* that is specified in the provided configuration.
|
||||
* @param aChildConf {@inheritDoc}
|
||||
* @throws CheckstyleException {@inheritDoc}
|
||||
* @see com.puppycrawl.tools.checkstyle.api.AutomaticBean
|
||||
*/
|
||||
@Override
|
||||
protected void setupChild(Configuration aChildConf)
|
||||
throws CheckstyleException
|
||||
|
|
|
|||
|
|
@ -70,7 +70,6 @@ final class StringArrayReader extends Reader
|
|||
}
|
||||
}
|
||||
|
||||
/** @see Reader */
|
||||
@Override
|
||||
public void close()
|
||||
{
|
||||
|
|
@ -83,7 +82,6 @@ final class StringArrayReader extends Reader
|
|||
return (mUnderlyingArray.length > mArrayIdx);
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public int read(char[] aCbuf, int aOff, int aLen) throws IOException
|
||||
{
|
||||
|
|
@ -121,7 +119,6 @@ final class StringArrayReader extends Reader
|
|||
return retVal;
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public int read() throws IOException
|
||||
{
|
||||
|
|
|
|||
|
|
@ -136,7 +136,6 @@ public final class TreeWalker
|
|||
mModuleFactory = aModuleFactory;
|
||||
}
|
||||
|
||||
/** @see com.puppycrawl.tools.checkstyle.api.Configurable */
|
||||
@Override
|
||||
public void finishLocalSetup()
|
||||
{
|
||||
|
|
@ -152,11 +151,6 @@ public final class TreeWalker
|
|||
mChildContext = checkContext;
|
||||
}
|
||||
|
||||
/**
|
||||
* Instantiates, configures and registers a Check that is specified
|
||||
* in the provided configuration.
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public void setupChild(Configuration aChildConf)
|
||||
throws CheckstyleException
|
||||
|
|
@ -498,9 +492,6 @@ public final class TreeWalker
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see com.puppycrawl.tools.checkstyle.api.FileSetCheck
|
||||
*/
|
||||
@Override
|
||||
public void destroy()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -332,18 +332,6 @@ final class StrArrayConverter extends AbstractArrayConverter
|
|||
this.useDefault = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the specified input object into an output object of the
|
||||
* specified type.
|
||||
*
|
||||
* @param aType Data type to which this value should be converted
|
||||
* @param aValue The input value to be converted
|
||||
*
|
||||
* @return the converted object
|
||||
*
|
||||
* @throws ConversionException if conversion cannot be performed
|
||||
* successfully
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public Object convert(Class aType, Object aValue)
|
||||
|
|
@ -381,26 +369,6 @@ final class StrArrayConverter extends AbstractArrayConverter
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Parse an incoming String of the form similar to an array initializer in
|
||||
* the Java language into a <code>List</code> individual Strings for each
|
||||
* element, according to the following rules.
|
||||
* </p>
|
||||
* <ul>
|
||||
* <li>The string must have matching '{' and '}' delimiters around a
|
||||
* comma-delimited list of values.</li>
|
||||
* <li>Whitespace before and after each element is stripped.
|
||||
* <li>If an element is itself delimited by matching single or double
|
||||
* quotes, the usual rules for interpreting a quoted String apply.</li>
|
||||
* </ul>
|
||||
*
|
||||
* @param aValue
|
||||
* String value to be parsed
|
||||
* @return the list of Strings parsed from the array
|
||||
* @throws NullPointerException
|
||||
* if <code>svalue</code> is <code>null</code>
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
protected List parseElements(final String aValue)
|
||||
|
|
|
|||
|
|
@ -224,15 +224,6 @@ public abstract class Check extends AbstractViolationReporter
|
|||
mTabWidth = aTabWidth;
|
||||
}
|
||||
|
||||
/**
|
||||
* Log an error message.
|
||||
*
|
||||
* @param aLine the line number where the error was found
|
||||
* @param aKey the message that describes the error
|
||||
* @param aArgs the details of the message
|
||||
*
|
||||
* @see java.text.MessageFormat
|
||||
*/
|
||||
@Override
|
||||
protected final void log(int aLine, String aKey, Object... aArgs)
|
||||
{
|
||||
|
|
@ -248,14 +239,6 @@ public abstract class Check extends AbstractViolationReporter
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Helper method to log a LocalizedMessage.
|
||||
*
|
||||
* @param aLineNo line number to associate with the message
|
||||
* @param aColNo column number to associate with the message
|
||||
* @param aKey key to locale message format
|
||||
* @param aArgs arguments for message
|
||||
*/
|
||||
@Override
|
||||
protected final void log(int aLineNo, int aColNo, String aKey,
|
||||
Object... aArgs)
|
||||
|
|
|
|||
|
|
@ -77,10 +77,6 @@ public final class DetailAST extends CommonAST
|
|||
mColumnNo = da.getColumnNo();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets this AST's first Child.
|
||||
* @param aAST the new first child
|
||||
*/
|
||||
@Override
|
||||
public void setFirstChild(AST aAST)
|
||||
{
|
||||
|
|
@ -91,10 +87,6 @@ public final class DetailAST extends CommonAST
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets AST's next sibling.
|
||||
* @param aAST the new next sibling
|
||||
*/
|
||||
@Override
|
||||
public void setNextSibling(AST aAST)
|
||||
{
|
||||
|
|
@ -116,10 +108,6 @@ public final class DetailAST extends CommonAST
|
|||
mPreviousSibling = aAST;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds new child to AST.
|
||||
* @param aAST the new child
|
||||
*/
|
||||
@Override
|
||||
public void addChild(AST aAST)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -106,14 +106,6 @@ public final class SeverityLevel implements Comparable<SeverityLevel>,
|
|||
return this.mCode - aObject.mCode;
|
||||
}
|
||||
|
||||
/**
|
||||
* The equals method.
|
||||
*
|
||||
* @param aObj Object to compare to.
|
||||
*
|
||||
* @return <code>true</code> means equal, <code>false</code> means
|
||||
* not equal.
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object aObj)
|
||||
{
|
||||
|
|
@ -128,11 +120,6 @@ public final class SeverityLevel implements Comparable<SeverityLevel>,
|
|||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* The hashCode method.
|
||||
*
|
||||
* @return hash code for the object.
|
||||
*/
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -477,7 +477,6 @@ public abstract class AbstractTypeAwareCheck extends Check
|
|||
return mIsLoadable;
|
||||
}
|
||||
|
||||
/** @return <code>Class</code> associated with an object. */
|
||||
@Override
|
||||
public Class<?> getClazz()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -88,14 +88,10 @@ public class IllegalInstantiationCheck
|
|||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent user from changing tokens in the configuration.
|
||||
* @see com.puppycrawl.tools.checkstyle.api.Check
|
||||
* @return empty array to not allow user to change configuration.
|
||||
*/
|
||||
@Override
|
||||
public int[] getAcceptableTokens()
|
||||
{
|
||||
// Return an empty array to not allow user to change configuration.
|
||||
return new int[] {};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -89,10 +89,6 @@ public class RedundantThrowsCheck extends AbstractTypeAwareCheck
|
|||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks exceptions declared in throws for a method or constructor.
|
||||
* @param aAST the tree node for the method or constructor.
|
||||
*/
|
||||
@Override
|
||||
protected final void processAST(DetailAST aAST)
|
||||
{
|
||||
|
|
@ -113,10 +109,6 @@ public class RedundantThrowsCheck extends AbstractTypeAwareCheck
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Logs error if unable to load class information.
|
||||
* @param aIdent class name for which we can no load class.
|
||||
*/
|
||||
@Override
|
||||
protected final void logLoadError(Token aIdent)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -48,14 +48,11 @@ public class SimplifyBooleanExpressionCheck
|
|||
return new int[] {TokenTypes.LITERAL_TRUE, TokenTypes.LITERAL_FALSE};
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent user from changing tokens in the configuration.
|
||||
* @see com.puppycrawl.tools.checkstyle.api.Check
|
||||
* @return an empty array.
|
||||
*/
|
||||
@Override
|
||||
public int[] getAcceptableTokens()
|
||||
{
|
||||
// Return empty list to prevent user changing tokens in the
|
||||
// configuration.
|
||||
return new int[] {};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -169,10 +169,6 @@ public class FinalClassCheck
|
|||
return mDeclaredAsAbstract;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a string representation of the object.
|
||||
* @return a string representation of the object
|
||||
*/
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -137,16 +137,11 @@ public final class StrictDuplicateCodeCheck extends AbstractFileSetCheck
|
|||
// we could also parse the java code using the TreeWalker
|
||||
// and then ignore everything before the CLASS_DEF...
|
||||
|
||||
|
||||
/**
|
||||
* computes a checksum for a aLine. to avoid false alarms it is
|
||||
* important that different lines result in different checksums.
|
||||
* @param aLine the aLine
|
||||
* @return checksum
|
||||
*/
|
||||
@Override
|
||||
protected int calcChecksum(String aLine)
|
||||
{
|
||||
// to avoid false alarms it is important that different lines
|
||||
// result in different checksums.
|
||||
if (aLine.startsWith("import ")) {
|
||||
return IGNORE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,9 +74,6 @@ public class RegexpHeaderCheck extends AbstractHeaderCheck
|
|||
getRegexpHeaderInfo().setMultiLines(aList);
|
||||
}
|
||||
|
||||
/**
|
||||
* @see com.puppycrawl.tools.checkstyle.api.Check#init()
|
||||
*/
|
||||
@Override
|
||||
public void init()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -81,10 +81,6 @@ final class RegexpHeaderInfo extends HeaderInfo
|
|||
return mHeaderRegexps;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes {@link #mHeaderRegexps} from
|
||||
* {@link HeaderInfo#getHeaderLines()}.
|
||||
*/
|
||||
@Override
|
||||
protected void postprocessHeaderLines()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -42,11 +42,6 @@ public class ArrayInitHandler extends BlockParentHandler
|
|||
super(aIndentCheck, "array initialization", aAst, aParent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Compute the indentation amount for this handler.
|
||||
*
|
||||
* @return the expected indentation amount
|
||||
*/
|
||||
@Override
|
||||
protected IndentLevel getLevelImpl()
|
||||
{
|
||||
|
|
@ -64,66 +59,36 @@ public class ArrayInitHandler extends BlockParentHandler
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* There is no top level expression for this handler.
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
@Override
|
||||
protected DetailAST getToplevelAST()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the left curly brace portion of the expression we are handling.
|
||||
*
|
||||
* @return the left curly brace expression
|
||||
*/
|
||||
@Override
|
||||
protected DetailAST getLCurly()
|
||||
{
|
||||
return getMainAst();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the right curly brace portion of the expression we are handling.
|
||||
*
|
||||
* @return the right curly brace expression
|
||||
*/
|
||||
@Override
|
||||
protected DetailAST getRCurly()
|
||||
{
|
||||
return getMainAst().findFirstToken(TokenTypes.RCURLY);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if the right curly brace must be at the start of the line.
|
||||
*
|
||||
* @return false
|
||||
*/
|
||||
@Override
|
||||
protected boolean rcurlyMustStart()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if child elements within the expression may be nested.
|
||||
*
|
||||
* @return true
|
||||
*/
|
||||
@Override
|
||||
protected boolean childrenMayNest()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the child element representing the list of statements.
|
||||
*
|
||||
* @return the statement list child
|
||||
*/
|
||||
@Override
|
||||
protected DetailAST getListChild()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -42,9 +42,6 @@ public class AssignHandler extends BlockParentHandler
|
|||
super(aIndentCheck, "assign", aAst, aParent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the indentation of the expression we are handling.
|
||||
*/
|
||||
@Override
|
||||
public void checkIndentation()
|
||||
{
|
||||
|
|
@ -76,11 +73,6 @@ public class AssignHandler extends BlockParentHandler
|
|||
checkExpressionSubtree(child, expectedLevel, false, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if indentation should be increased after
|
||||
* fisrt line in checkLinesIndent()
|
||||
* false otherwise
|
||||
*/
|
||||
@Override
|
||||
protected boolean shouldIncreaseIndent()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -278,9 +278,6 @@ public class BlockParentHandler extends ExpressionHandler
|
|||
return getMainAst().findFirstToken(TokenTypes.LPAREN);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the indentation of the expression we are handling.
|
||||
*/
|
||||
@Override
|
||||
public void checkIndentation()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -50,11 +50,6 @@ public class CaseHandler extends ExpressionHandler
|
|||
super(aIndentCheck, "case", aExpr, aParent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Compute the indentation amount for this handler.
|
||||
*
|
||||
* @return the expected indentation amount
|
||||
*/
|
||||
@Override
|
||||
protected IndentLevel getLevelImpl()
|
||||
{
|
||||
|
|
@ -70,24 +65,12 @@ public class CaseHandler extends ExpressionHandler
|
|||
checkChildren(getMainAst(), mCaseChildren, getLevel(), true, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Indentation level suggested for a child element. Children don't have
|
||||
* to respect this, but most do.
|
||||
*
|
||||
* @param aChild child AST (so suggestion level can differ based on child
|
||||
* type)
|
||||
*
|
||||
* @return suggested indentation for child
|
||||
*/
|
||||
@Override
|
||||
public IndentLevel suggestedChildLevel(ExpressionHandler aChild)
|
||||
{
|
||||
return getLevel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the indentation of the expression we are handling.
|
||||
*/
|
||||
@Override
|
||||
public void checkIndentation()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -42,11 +42,6 @@ public class CatchHandler extends BlockParentHandler
|
|||
super(aIndentCheck, "catch", aAst, aParent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if the top level token must start the line.
|
||||
*
|
||||
* @return false
|
||||
*/
|
||||
@Override
|
||||
protected boolean toplevelMustStartLine()
|
||||
{
|
||||
|
|
@ -63,9 +58,6 @@ public class CatchHandler extends BlockParentHandler
|
|||
checkExpressionSubtree(condAst, getLevel(), false, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the indentation of the expression we are handling.
|
||||
*/
|
||||
@Override
|
||||
public void checkIndentation()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -47,11 +47,6 @@ public class ClassDefHandler extends BlockParentHandler
|
|||
aAst, aParent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the left curly brace portion of the expression we are handling.
|
||||
*
|
||||
* @return the left curly brace expression
|
||||
*/
|
||||
@Override
|
||||
protected DetailAST getLCurly()
|
||||
{
|
||||
|
|
@ -59,11 +54,6 @@ public class ClassDefHandler extends BlockParentHandler
|
|||
.findFirstToken(TokenTypes.LCURLY);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the right curly brace portion of the expression we are handling.
|
||||
*
|
||||
* @return the right curly brace expression
|
||||
*/
|
||||
@Override
|
||||
protected DetailAST getRCurly()
|
||||
{
|
||||
|
|
@ -71,11 +61,6 @@ public class ClassDefHandler extends BlockParentHandler
|
|||
.findFirstToken(TokenTypes.RCURLY);
|
||||
}
|
||||
|
||||
/**
|
||||
* There is no top level expression for this handler.
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
@Override
|
||||
protected DetailAST getToplevelAST()
|
||||
{
|
||||
|
|
@ -83,20 +68,12 @@ public class ClassDefHandler extends BlockParentHandler
|
|||
// note: ident checked by hand in check indentation;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the child element representing the list of statements.
|
||||
*
|
||||
* @return the statement list child
|
||||
*/
|
||||
@Override
|
||||
protected DetailAST getListChild()
|
||||
{
|
||||
return getMainAst().findFirstToken(TokenTypes.OBJBLOCK);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the indentation of the expression we are handling.
|
||||
*/
|
||||
@Override
|
||||
public void checkIndentation()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -52,9 +52,6 @@ public class DoWhileHandler extends BlockParentHandler
|
|||
checkExpressionSubtree(condAst, getLevel(), false, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the indentation of the expression we are handling.
|
||||
*/
|
||||
@Override
|
||||
public void checkIndentation()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -42,9 +42,6 @@ public class ElseHandler extends BlockParentHandler
|
|||
super(aIndentCheck, "else", aAst, aParent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the indent of the top level token.
|
||||
*/
|
||||
@Override
|
||||
protected void checkToplevelToken()
|
||||
{
|
||||
|
|
@ -68,11 +65,6 @@ public class ElseHandler extends BlockParentHandler
|
|||
super.checkToplevelToken();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the child element that is not a list of statements.
|
||||
*
|
||||
* @return the non-list child element
|
||||
*/
|
||||
@Override
|
||||
protected DetailAST getNonlistChild()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -41,11 +41,6 @@ public class FinallyHandler extends BlockParentHandler
|
|||
super(aIndentCheck, "finally", aAst, aParent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if the top level token must start the line.
|
||||
*
|
||||
* @return false
|
||||
*/
|
||||
@Override
|
||||
protected boolean toplevelMustStartLine()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -70,9 +70,6 @@ public class ForHandler extends BlockParentHandler
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the indentation of the expression we are handling.
|
||||
*/
|
||||
@Override
|
||||
public void checkIndentation()
|
||||
{
|
||||
|
|
@ -80,15 +77,6 @@ public class ForHandler extends BlockParentHandler
|
|||
super.checkIndentation();
|
||||
}
|
||||
|
||||
/**
|
||||
* Indentation level suggested for a child element. Children don't have
|
||||
* to respect this, but most do.
|
||||
*
|
||||
* @param aChild child AST (so suggestion level can differ based on child
|
||||
* type)
|
||||
*
|
||||
* @return suggested indentation for child
|
||||
*/
|
||||
@Override
|
||||
public IndentLevel suggestedChildLevel(ExpressionHandler aChild)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -42,15 +42,6 @@ public class IfHandler extends BlockParentHandler
|
|||
super(aIndentCheck, "if", aAst, aParent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Indentation level suggested for a child element. Children don't have
|
||||
* to respect this, but most do.
|
||||
*
|
||||
* @param aChild child AST (so suggestion level can differ based on child
|
||||
* type)
|
||||
*
|
||||
* @return suggested indentation for child
|
||||
*/
|
||||
@Override
|
||||
public IndentLevel suggestedChildLevel(ExpressionHandler aChild)
|
||||
{
|
||||
|
|
@ -60,11 +51,6 @@ public class IfHandler extends BlockParentHandler
|
|||
return super.suggestedChildLevel(aChild);
|
||||
}
|
||||
|
||||
/**
|
||||
* Compute the indentation amount for this handler.
|
||||
*
|
||||
* @return the expected indentation amount
|
||||
*/
|
||||
@Override
|
||||
protected IndentLevel getLevelImpl()
|
||||
{
|
||||
|
|
@ -88,9 +74,6 @@ public class IfHandler extends BlockParentHandler
|
|||
&& (parent.getLineNo() == getMainAst().getLineNo());
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the indentation of the top level token.
|
||||
*/
|
||||
@Override
|
||||
protected void checkToplevelToken()
|
||||
{
|
||||
|
|
@ -113,9 +96,6 @@ public class IfHandler extends BlockParentHandler
|
|||
checkExpressionSubtree(condAst, expected, false, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the indentation of the expression we are handling.
|
||||
*/
|
||||
@Override
|
||||
public void checkIndentation()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -42,9 +42,6 @@ public class ImportHandler extends ExpressionHandler
|
|||
super(aIndentCheck, "import", aAst, aParent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the indentation of the expression we are handling.
|
||||
*/
|
||||
@Override
|
||||
public void checkIndentation()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -101,7 +101,6 @@ public class IndentLevel
|
|||
mLevels.addAll(aIndent.mLevels);
|
||||
}
|
||||
|
||||
/** @return string representation of the object. */
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -49,11 +49,6 @@ public class LabelHandler extends ExpressionHandler
|
|||
super(aIndentCheck, "label", aExpr, aParent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Compute the indentation amount for this handler.
|
||||
*
|
||||
* @return the expected indentation amount
|
||||
*/
|
||||
@Override
|
||||
protected IndentLevel getLevelImpl()
|
||||
{
|
||||
|
|
@ -68,9 +63,6 @@ public class LabelHandler extends ExpressionHandler
|
|||
checkChildren(getMainAst(), mLabelChildren, getLevel(), true, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the indentation of the expression we are handling.
|
||||
*/
|
||||
@Override
|
||||
public void checkIndentation()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -98,9 +98,6 @@ public class LineSet
|
|||
return mLines.isEmpty();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string representation
|
||||
*/
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -67,9 +67,6 @@ public class MemberDefHandler extends ExpressionHandler
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the indentation of the expression we are handling.
|
||||
*/
|
||||
@Override
|
||||
public void checkIndentation()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -46,11 +46,6 @@ public class MethodCallHandler extends ExpressionHandler
|
|||
aParent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Compute the indentation amount for this handler.
|
||||
*
|
||||
* @return the expected indentation amount
|
||||
*/
|
||||
@Override
|
||||
protected IndentLevel getLevelImpl()
|
||||
{
|
||||
|
|
@ -133,15 +128,6 @@ public class MethodCallHandler extends ExpressionHandler
|
|||
return ast;
|
||||
}
|
||||
|
||||
/**
|
||||
* Indentation level suggested for a child element. Children don't have
|
||||
* to respect this, but most do.
|
||||
*
|
||||
* @param aChild child AST (so suggestion level can differ based on child
|
||||
* type)
|
||||
*
|
||||
* @return suggested indentation for child
|
||||
*/
|
||||
@Override
|
||||
public IndentLevel suggestedChildLevel(ExpressionHandler aChild)
|
||||
{
|
||||
|
|
@ -161,9 +147,6 @@ public class MethodCallHandler extends ExpressionHandler
|
|||
return new IndentLevel(indentLevel);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the indentation of the expression we are handling.
|
||||
*/
|
||||
@Override
|
||||
public void checkIndentation()
|
||||
{
|
||||
|
|
@ -196,11 +179,6 @@ public class MethodCallHandler extends ExpressionHandler
|
|||
checkRParen(lparen, rparen);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return true if indentation should be increased after
|
||||
* fisrt line in checkLinesIndent()
|
||||
* false otherwise
|
||||
*/
|
||||
@Override
|
||||
protected boolean shouldIncreaseIndent()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -43,11 +43,6 @@ public class MethodDefHandler extends BlockParentHandler
|
|||
? "ctor def" : "method def", aAst, aParent);
|
||||
}
|
||||
|
||||
/**
|
||||
* There is no top level expression for this handler.
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
@Override
|
||||
protected DetailAST getToplevelAST()
|
||||
{
|
||||
|
|
@ -112,9 +107,6 @@ public class MethodDefHandler extends BlockParentHandler
|
|||
checkExpressionSubtree(params, getLevel(), false, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the indentation of the expression we are handling.
|
||||
*/
|
||||
@Override
|
||||
public void checkIndentation()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -42,55 +42,30 @@ public class ObjectBlockHandler extends BlockParentHandler
|
|||
super(aIndentCheck, "object def", aAst, aParent);
|
||||
}
|
||||
|
||||
/**
|
||||
* There is no top level expression for this handler.
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
@Override
|
||||
protected DetailAST getToplevelAST()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the left curly brace portion of the expression we are handling.
|
||||
*
|
||||
* @return the left curly brace expression
|
||||
*/
|
||||
@Override
|
||||
protected DetailAST getLCurly()
|
||||
{
|
||||
return getMainAst().findFirstToken(TokenTypes.LCURLY);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the right curly brace portion of the expression we are handling.
|
||||
*
|
||||
* @return the right curly brace expression
|
||||
*/
|
||||
@Override
|
||||
protected DetailAST getRCurly()
|
||||
{
|
||||
return getMainAst().findFirstToken(TokenTypes.RCURLY);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the child element representing the list of statements.
|
||||
*
|
||||
* @return the statement list child
|
||||
*/
|
||||
@Override
|
||||
protected DetailAST getListChild()
|
||||
{
|
||||
return getMainAst();
|
||||
}
|
||||
|
||||
/**
|
||||
* Compute the indentation amount for this handler.
|
||||
*
|
||||
* @return the expected indentation amount
|
||||
*/
|
||||
@Override
|
||||
protected IndentLevel getLevelImpl()
|
||||
{
|
||||
|
|
@ -105,9 +80,6 @@ public class ObjectBlockHandler extends BlockParentHandler
|
|||
return indent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the indentation of the expression we are handling.
|
||||
*/
|
||||
@Override
|
||||
public void checkIndentation()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -42,9 +42,6 @@ public class PackageDefHandler extends ExpressionHandler
|
|||
super(aIndentCheck, "package def", aAst, aParent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the indentation of the expression we are handling.
|
||||
*/
|
||||
@Override
|
||||
public void checkIndentation()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -35,35 +35,18 @@ public class PrimordialHandler extends ExpressionHandler
|
|||
super(aIndentCheck, null, null, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the indentation of the expression we are handling.
|
||||
*/
|
||||
@Override
|
||||
public void checkIndentation()
|
||||
{
|
||||
// nothing to check
|
||||
}
|
||||
|
||||
/**
|
||||
* Indentation level suggested for a child element. Children don't have
|
||||
* to respect this, but most do.
|
||||
*
|
||||
* @param aChild child AST (so suggestion level can differ based on child
|
||||
* type)
|
||||
*
|
||||
* @return suggested indentation for child
|
||||
*/
|
||||
@Override
|
||||
public IndentLevel suggestedChildLevel(ExpressionHandler aChild)
|
||||
{
|
||||
return new IndentLevel(0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Compute the indentation amount for this handler.
|
||||
*
|
||||
* @return the expected indentation amount
|
||||
*/
|
||||
@Override
|
||||
protected IndentLevel getLevelImpl()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -42,15 +42,6 @@ public class SlistHandler extends BlockParentHandler
|
|||
super(aIndentCheck, "block", aAst, aParent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Indentation level suggested for a child element. Children don't have
|
||||
* to respect this, but most do.
|
||||
*
|
||||
* @param aChild child AST (so suggestion level can differ based on child
|
||||
* type)
|
||||
*
|
||||
* @return suggested indentation for child
|
||||
*/
|
||||
@Override
|
||||
public IndentLevel suggestedChildLevel(ExpressionHandler aChild)
|
||||
{
|
||||
|
|
@ -74,11 +65,6 @@ public class SlistHandler extends BlockParentHandler
|
|||
return super.suggestedChildLevel(aChild);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the child element that is not a list of statements.
|
||||
*
|
||||
* @return the non-list child element
|
||||
*/
|
||||
@Override
|
||||
protected DetailAST getNonlistChild()
|
||||
{
|
||||
|
|
@ -89,44 +75,24 @@ public class SlistHandler extends BlockParentHandler
|
|||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the child element representing the list of statements.
|
||||
*
|
||||
* @return the statement list child
|
||||
*/
|
||||
@Override
|
||||
protected DetailAST getListChild()
|
||||
{
|
||||
return getMainAst();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the left curly brace portion of the expression we are handling.
|
||||
*
|
||||
* @return the left curly brace expression
|
||||
*/
|
||||
@Override
|
||||
protected DetailAST getLCurly()
|
||||
{
|
||||
return getMainAst();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the right curly brace portion of the expression we are handling.
|
||||
*
|
||||
* @return the right curly brace expression
|
||||
*/
|
||||
@Override
|
||||
protected DetailAST getRCurly()
|
||||
{
|
||||
return getMainAst().findFirstToken(TokenTypes.RCURLY);
|
||||
}
|
||||
|
||||
/**
|
||||
* There is no top level expression for this handler.
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
@Override
|
||||
protected DetailAST getToplevelAST()
|
||||
{
|
||||
|
|
@ -154,9 +120,6 @@ public class SlistHandler extends BlockParentHandler
|
|||
|| (parentType == TokenTypes.STATIC_INIT);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the indentation of the expression we are handling.
|
||||
*/
|
||||
@Override
|
||||
public void checkIndentation()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -41,11 +41,6 @@ public class StaticInitHandler extends BlockParentHandler
|
|||
super(aIndentCheck, "static initialization", aAst, aParent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if the top level token must start the line.
|
||||
*
|
||||
* @return false
|
||||
*/
|
||||
@Override
|
||||
protected boolean toplevelMustStartLine()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -42,33 +42,18 @@ public class SwitchHandler extends BlockParentHandler
|
|||
super(aIndentCheck, "switch", aAst, aParent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the left curly brace portion of the expression we are handling.
|
||||
*
|
||||
* @return the left curly brace expression
|
||||
*/
|
||||
@Override
|
||||
protected DetailAST getLCurly()
|
||||
{
|
||||
return getMainAst().findFirstToken(TokenTypes.LCURLY);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the right curly brace portion of the expression we are handling.
|
||||
*
|
||||
* @return the right curly brace expression
|
||||
*/
|
||||
@Override
|
||||
protected DetailAST getRCurly()
|
||||
{
|
||||
return getMainAst().findFirstToken(TokenTypes.RCURLY);
|
||||
}
|
||||
|
||||
/**
|
||||
* There is no list of statements child for this handler.
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
@Override
|
||||
protected DetailAST getListChild()
|
||||
{
|
||||
|
|
@ -79,11 +64,6 @@ public class SwitchHandler extends BlockParentHandler
|
|||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* There is no child element that is not a list of statements.
|
||||
*
|
||||
* @return null
|
||||
*/
|
||||
@Override
|
||||
protected DetailAST getNonlistChild()
|
||||
{
|
||||
|
|
@ -103,9 +83,6 @@ public class SwitchHandler extends BlockParentHandler
|
|||
false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the indentation of the expression we are handling.
|
||||
*/
|
||||
@Override
|
||||
public void checkIndentation()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -41,15 +41,6 @@ public class TryHandler extends BlockParentHandler
|
|||
super(aIndentCheck, "try", aAst, aParent);
|
||||
}
|
||||
|
||||
/**
|
||||
* Indentation level suggested for a child element. Children don't have
|
||||
* to respect this, but most do.
|
||||
*
|
||||
* @param aChild child AST (so suggestion level can differ based on child
|
||||
* type)
|
||||
*
|
||||
* @return suggested indentation for child
|
||||
*/
|
||||
@Override
|
||||
public IndentLevel suggestedChildLevel(ExpressionHandler aChild)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -53,9 +53,6 @@ public class WhileHandler extends BlockParentHandler
|
|||
checkExpressionSubtree(condAst, expected, false, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the indentation of the expression we are handling.
|
||||
*/
|
||||
@Override
|
||||
public void checkIndentation()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -126,11 +126,6 @@ class HtmlTag
|
|||
return mPosition;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns this HTML tag and trailing text.
|
||||
* Used for displaying a Checkstyle error.
|
||||
* @return the String text of this tag.
|
||||
*/
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -169,6 +169,7 @@ public class OperatorWrapCheck
|
|||
|
||||
};
|
||||
}
|
||||
|
||||
@Override
|
||||
public void visitToken(DetailAST aAST)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -98,21 +98,18 @@ class CSVFilter implements IntFilter
|
|||
return false;
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return mFilters.toString();
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
return mFilters.hashCode();
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public boolean equals(Object aObject)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -42,21 +42,18 @@ class IntMatchFilter implements IntFilter
|
|||
return mMatchValue == aInt;
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return "IntMatchFilter[" + mMatchValue + "]";
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
return Integer.valueOf(mMatchValue).hashCode();
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public boolean equals(Object aObject)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -52,14 +52,12 @@ class IntRangeFilter implements IntFilter
|
|||
&& (mUpperBound.compareTo(aInt) >= 0));
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
return HASH_MULT * mLowerBound.intValue() + mUpperBound.intValue();
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public boolean equals(Object aObject)
|
||||
{
|
||||
|
|
@ -70,7 +68,7 @@ class IntRangeFilter implements IntFilter
|
|||
}
|
||||
return false;
|
||||
}
|
||||
/** {@inheritDoc} */
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -170,7 +170,6 @@ public class SuppressElement
|
|||
return true;
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
|
|
@ -179,7 +178,6 @@ public class SuppressElement
|
|||
+ mColumnsCSV + "]";
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
|
|
@ -199,7 +197,6 @@ public class SuppressElement
|
|||
return result;
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public boolean equals(Object aObject)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -240,7 +240,6 @@ public class SuppressionCommentFilter
|
|||
return result;
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public final String toString()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -55,21 +55,18 @@ public class SuppressionFilter
|
|||
return mFilters.accept(aEvent);
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return mFilters.toString();
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public int hashCode()
|
||||
{
|
||||
return mFilters.hashCode();
|
||||
}
|
||||
|
||||
/** {@inheritDoc} */
|
||||
@Override
|
||||
public boolean equals(Object aObject)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -78,7 +78,6 @@ public final class SuppressionsLoader
|
|||
return mFilterChain;
|
||||
}
|
||||
|
||||
/** {@inheritDoc} **/
|
||||
@Override
|
||||
public void startElement(String aNamespaceURI,
|
||||
String aLocalName,
|
||||
|
|
|
|||
Loading…
Reference in New Issue