Class IllegalTokenCheck

  • All Implemented Interfaces:
    Configurable, Contextualizable

    public class IllegalTokenCheck
    extends AbstractCheck

    Checks for illegal tokens. By default labels are prohibited.

    Rationale: Certain language features can harm readability, lead to confusion or are not obvious to novice developers. Other features may be discouraged in certain frameworks, such as not having native methods in EJB components.

    An example of how to configure the check is:

     <module name="IllegalToken"/>
     

    An example of how to configure the check to forbid a LITERAL_NATIVE token is:

     <module name="IllegalToken">
         <property name="tokens" value="LITERAL_NATIVE"/>
     </module>
     
    Author:
    Simon Harris, Rick Giles