KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > beehive > controls > api > bean > ControlChecker


1 package org.apache.beehive.controls.api.bean;
2 /*
3  * Copyright 2004 The Apache Software Foundation.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  * $Header:$
18  */

19
20 import com.sun.mirror.apt.AnnotationProcessorEnvironment;
21 import com.sun.mirror.declaration.Declaration;
22
23 /**
24  * The ControlChecker interface is implemented by control authors wishing to
25  * enforce rich semantic validation on extension and field instance declarations of
26  * their controls. By supplying a ControlChecker implementation (a "checker")
27  * and associating it with your control's public interface, when an extension (.jcx)
28  * of your control is processed at build-time, the checker will be invoked and
29  * can do rich validation of the jcx type and field instances via introspection and
30  * analysis of the jcx's type structure, signatures and annotations.
31  * <p>
32  * Checkers are instantiated by, and required to implement, a no-arg constructor.
33  * They are provided with type information and context via the Sun mirror API.
34  */

35 public interface ControlChecker
36 {
37     /**
38      * Invoked by the control build-time infrastructure to process a declaration of
39      * a control extension (ie, an interface annotated with @ControlExtension), or
40      * a field instance of a control type.
41      */

42     public void check(Declaration decl, AnnotationProcessorEnvironment env);
43 }
44
Popular Tags