Package com.puppycrawl.tools.checkstyle.api

Examples of com.puppycrawl.tools.checkstyle.api.Check


    final Object module = mModuleFactory.createModule(name);
    if (!(module instanceof Check)) {
      throw new CheckstyleException(
          "TreeWalker is not allowed as a parent of " + name);
    }
    final Check c = (Check) module;
    c.contextualize(mChildContext);
    c.configure(aChildConf);
    c.init();

    registerCheck(c);
  }
View Full Code Here


        final Object module = mModuleFactory.createModule(name);
        if (!(module instanceof Check)) {
            throw new CheckstyleException(
                "TreeWalker is not allowed as a parent of " + name);
        }
        final Check c = (Check) module;
        c.contextualize(mChildContext);
        c.configure(aChildConf);
        c.init();

        registerCheck(c);
    }
View Full Code Here

        final Object module = mModuleFactory.createModule(name);
        if (!(module instanceof Check)) {
            throw new CheckstyleException(
                "TreeWalker is not allowed as a parent of " + name);
        }
        final Check c = (Check) module;
        c.contextualize(mChildContext);
        c.configure(aChildConf);
        c.init();

        registerCheck(c);
    }
View Full Code Here

     */
    private void notifyBegin(DetailAST aRootAST, FileContents aContents)
    {
        final Iterator it = mAllChecks.iterator();
        while (it.hasNext()) {
            final Check check = (Check) it.next();
            check.setFileContents(aContents);
            check.beginTree(aRootAST);
        }
    }
View Full Code Here

     */
    private void notifyEnd(DetailAST aRootAST)
    {
        final Iterator it = mAllChecks.iterator();
        while (it.hasNext()) {
            final Check check = (Check) it.next();
            check.finishTree(aRootAST);
        }
    }
View Full Code Here

        final ArrayList visitors =
            (ArrayList) mTokenToChecks.get(
                TokenTypes.getTokenName(aAST.getType()));
        if (visitors != null) {
            for (int i = 0; i < visitors.size(); i++) {
                final Check check = (Check) visitors.get(i);
                check.visitToken(aAST);
            }
        }
    }
View Full Code Here

        final ArrayList visitors =
            (ArrayList) mTokenToChecks.get(
                TokenTypes.getTokenName(aAST.getType()));
        if (visitors != null) {
            for (int i = 0; i < visitors.size(); i++) {
                final Check check = (Check) visitors.get(i);
                check.leaveToken(aAST);
            }
        }
    }
View Full Code Here

     * @see com.puppycrawl.tools.checkstyle.api.FileSetCheck
     */
    public void destroy()
    {
        for (final Iterator it = mAllChecks.iterator(); it.hasNext();) {
            final Check c = (Check) it.next();
            c.destroy();
        }
        mCache.destroy();
        super.destroy();
    }
View Full Code Here

        final Object module = mModuleFactory.createModule(name);
        if (!(module instanceof Check)) {
            throw new CheckstyleException(
                "TreeWalker is not allowed as a parent of " + name);
        }
        final Check c = (Check) module;
        c.contextualize(mChildContext);
        c.configure(aChildConf);
        c.init();

        registerCheck(c);
    }
View Full Code Here

        final String footer = ".\n * </p>\n";
        final String prefix = " *  {@link TokenTypes#";

        try {
            final Class clazz = Class.forName(args[0]);
            final Check check = (Check) clazz.newInstance();           
            final int[] defaultTokens = check.getDefaultTokens();
            if (defaultTokens.length > 0) {
                final StringBuffer buf = new StringBuffer();
                buf.append(header);
                final ArrayList tokenNames = new ArrayList();
                for (int i = 0; i < defaultTokens.length; i++) {
View Full Code Here

TOP

Related Classes of com.puppycrawl.tools.checkstyle.api.Check

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.