summaryrefslogtreecommitdiffstats
path: root/parent/org.jvnet.hudson/src/main/java/org/jvnet/hudson/annotation_indexer/Validator.java
blob: 4015d2588f8ee1d7e5050bc967f100241068900a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
/*
 * The contents of this file are subject to the terms of the Common Development
 * and Distribution License (the License). You may not use this file except in
 * compliance with the License.
 *
 * You can obtain a copy of the License at http://www.sun.com/cddl/cddl.html
 * or http://www.netbeans.org/cddl.txt.
 *
 * When distributing Covered Code, include this CDDL Header Notice in each file
 * and include the License file at http://www.netbeans.org/cddl.txt.
 * If applicable, add the following below the CDDL Header, with the fields
 * enclosed by brackets [] replaced by your own identifying information:
 * "Portions Copyrighted [year] [name of copyright owner]"
 *
 * The Original Software is SezPoz. The Initial Developer of the Original
 * Software is Sun Microsystems, Inc. Portions Copyright 2008 Sun
 * Microsystems, Inc. All Rights Reserved.
 */
package org.jvnet.hudson.annotation_indexer;

import javax.annotation.processing.RoundEnvironment;
import javax.annotation.processing.ProcessingEnvironment;
import javax.lang.model.element.Element;

/**
 * Checkes the usage of {@link Indexed} annotations at compile-time.
 *
 * @author Kohsuke Kawaguchi
 * @see Indexed
 */
public interface Validator {
    /**
     * Checks the occurrence of the {@link Indexed} annotation
     * and report any error. Useful for early error detection.
     */
    void check(Element use, RoundEnvironment e, ProcessingEnvironment env);
}