Check.java :  » IntelliJ » checkstyle-idea » org » infernus » idea » checkstyle » checks » Java Open Source

Java Open Source » IntelliJ » checkstyle idea 
checkstyle idea » org » infernus » idea » checkstyle » checks » Check.java
package org.infernus.idea.checkstyle.checks;

import com.intellij.psi.PsiFile;
import com.puppycrawl.tools.checkstyle.api.AuditEvent;
import com.puppycrawl.tools.checkstyle.api.Configuration;
import org.jetbrains.annotations.NotNull;

/**
 * Allows extra logic for a certain Check.
 * <p/>
 * Not a lot of extra logic at present, but it's a start.
 */
public interface Check {

    /**
     * Configure the check given the CheckStyle configuration.
     *
     * @param config the configuration.
     */
    void configure(@NotNull Configuration config);

    /**
     * Process a file.
     *
     * @param file  the file.
     * @param event the audit event.
     * @return true to continue processing, false to cancel.
     */
    boolean process(@NotNull PsiFile file, @NotNull AuditEvent event);

}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.