Class AbstractIllegalMethodCheck

  • All Implemented Interfaces:
    Configurable, Contextualizable

    @Deprecated
    public abstract class AbstractIllegalMethodCheck
    extends AbstractCheck
    Deprecated.
    Checkstyle will not support abstract checks anymore. Use AbstractCheck instead.
    Provide support for checking for a method with a specified name and no arguments.
    • Field Detail

      • methodName

        private final java.lang.String methodName
        Deprecated.
        Name of method to disallow.
      • errorKey

        private final java.lang.String errorKey
        Deprecated.
        The error key to report with.
    • Constructor Detail

      • AbstractIllegalMethodCheck

        protected AbstractIllegalMethodCheck​(java.lang.String methodName,
                                             java.lang.String errorKey)
        Deprecated.
        Creates an instance.
        Parameters:
        methodName - name of the method to disallow.
        errorKey - the error key to report with.
    • Method Detail

      • getDefaultTokens

        public int[] getDefaultTokens()
        Deprecated.
        Description copied from class: AbstractCheck
        Returns the default token a check is interested in. Only used if the configuration for a check does not define the tokens.
        Specified by:
        getDefaultTokens in class AbstractCheck
        Returns:
        the default tokens
        See Also:
        TokenTypes
      • getAcceptableTokens

        public int[] getAcceptableTokens()
        Deprecated.
        Description copied from class: AbstractCheck
        The configurable token set. Used to protect Checks against malicious users who specify an unacceptable token set in the configuration file. The default implementation returns the check's default tokens.
        Specified by:
        getAcceptableTokens in class AbstractCheck
        Returns:
        the token set this check is designed for.
        See Also:
        TokenTypes
      • getRequiredTokens

        public int[] getRequiredTokens()
        Deprecated.
        Description copied from class: AbstractCheck
        The tokens that this check must be registered for.
        Specified by:
        getRequiredTokens in class AbstractCheck
        Returns:
        the token set this must be registered for.
        See Also:
        TokenTypes
      • visitToken

        public void visitToken​(DetailAST aAST)
        Deprecated.
        Description copied from class: AbstractCheck
        Called to process a token.
        Overrides:
        visitToken in class AbstractCheck
        Parameters:
        aAST - the token to process