com.jimischopp.checkstyle
Class WastefulDateCreationCheck

java.lang.Object
  extended by com.puppycrawl.tools.checkstyle.api.AutomaticBean
      extended by com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
          extended by com.puppycrawl.tools.checkstyle.api.Check
              extended by com.jimischopp.checkstyle.AbstractBaseChecker
                  extended by com.jimischopp.checkstyle.WastefulDateCreationCheck
All Implemented Interfaces:
com.puppycrawl.tools.checkstyle.api.Configurable, com.puppycrawl.tools.checkstyle.api.Contextualizable

public class WastefulDateCreationCheck
extends AbstractBaseChecker

Checks that 'new java.util.Date().getTime()' is never called. This should be replaced by a simple call to System.currentTimeMillis().

Copyright 2003, James Schopp

Since:
Oct 27, 2003
Author:
James Schopp
See Also:
Check

Constructor Summary
WastefulDateCreationCheck()
           
 
Method Summary
 int[] getAcceptableTokens()
           
 int[] getDefaultTokens()
           
 int[] getRequiredTokens()
           
 void visitToken(com.puppycrawl.tools.checkstyle.api.DetailAST ast)
           
 
Methods inherited from class com.jimischopp.checkstyle.AbstractBaseChecker
isInsideLoop
 
Methods inherited from class com.puppycrawl.tools.checkstyle.api.Check
beginTree, destroy, finishTree, getClassLoader, getFileContents, getLines, getTokenNames, init, leaveToken, setClassLoader, setFileContents, setMessages, setTabWidth, setTokens
 
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
getId, getSeverity, getSeverityLevel, setId, setSeverity
 
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AutomaticBean
configure, contextualize
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WastefulDateCreationCheck

public WastefulDateCreationCheck()
Method Detail

getDefaultTokens

public int[] getDefaultTokens()
Specified by:
getDefaultTokens in class com.puppycrawl.tools.checkstyle.api.Check

getAcceptableTokens

public int[] getAcceptableTokens()
Overrides:
getAcceptableTokens in class com.puppycrawl.tools.checkstyle.api.Check

getRequiredTokens

public int[] getRequiredTokens()
Overrides:
getRequiredTokens in class com.puppycrawl.tools.checkstyle.api.Check

visitToken

public void visitToken(com.puppycrawl.tools.checkstyle.api.DetailAST ast)
Overrides:
visitToken in class com.puppycrawl.tools.checkstyle.api.Check