de.smartics.checkstyle.checks.strings
Class StringLiteralEncodingCheck

Package class diagram package StringLiteralEncodingCheck
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 de.smartics.checkstyle.checks.strings.StringLiteralEncodingCheck
All Implemented Interfaces:
Configurable, Contextualizable

public class StringLiteralEncodingCheck
     
     
extends Check

Check to detect usage of characters of disallowed encoding in String and character literals.


Constructor Summary
StringLiteralEncodingCheck()
          Default constructor.
 
Method Summary
 int[] getDefaultTokens()
          
 void setEncoding(String encoding)
          Sets the allowed encoding within String literals.
 String toString()
          Returns the string representation of the class for debugging.
 void visitToken(DetailAST ast)
          
 
Methods inherited from class com.puppycrawl.tools.checkstyle.api.Check
beginTree, destroy, finishTree, getAcceptableTokens, getClassLoader, getFileContents, getLines, getRequiredTokens, getTabWidth, getTokenNames, init, leaveToken, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokens
 
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, log, setId, setSeverity
 
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AutomaticBean
configure, contextualize, finishLocalSetup, getConfiguration, setupChild
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringLiteralEncodingCheck

public StringLiteralEncodingCheck()
Default constructor.

Method Detail

setEncoding

public void setEncoding(String encoding)
Sets the allowed encoding within String literals.

Parameters:
encoding - the allowed encoding within String literals.

getDefaultTokens

public int[] getDefaultTokens()

Specified by:
getDefaultTokens in class Check
See Also:
Check.getDefaultTokens()

visitToken

public void visitToken(DetailAST ast)

Overrides:
visitToken in class Check
See Also:
Check.visitToken(com.puppycrawl.tools.checkstyle.api.DetailAST)

toString

public String toString()
Returns the string representation of the class for debugging.

Overrides:
toString in class Object
Returns:
the string representation of the class for debugging.


Copyright © 2011-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.