KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > fractal > fraclet > annotation > FractalImportedInterface


1 /*==============================================================================
2  Fraclet annotation - Copyright (C) 2002-2006 INRIA Futurs / LIFL
3  Fractal Component Model (contact: fractal@objectweb.org)
4
5  This library is free software; you can redistribute it and/or modify it under
6  the terms of the GNU Lesser General Public License as published by the Free
7  Software Foundation; either version 2.1 of the License, or any later version.
8
9  This library is distributed in the hope that it will be useful, but WITHOUT ANY
10  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
11  PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
12
13  You should have received a copy of the GNU Lesser General Public License along
14  with this library; if not, write to the Free Software Foundation, Inc.,
15  59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
17  Initial developer(s): Nicolas Pessemier (nicolas.pessemier@lifl.fr)
18  ==============================================================================*/

19
20 package org.objectweb.fractal.fraclet.annotation;
21
22 /**
23  * An annotation to manage the particular case where a Fractal component uses
24  * one or several Java interface imported from a jar. For instance,
25  * java.lang.Runnable, which is regularly used in AOKell and Julia to bootstrap
26  * a Fractal application.
27  *
28  * This annotation encapsulates an array of the @FractalItf annotation.
29  *
30  * For example if your are annotating a content class which implements 3 interfaces
31  * and the java.lang.Runnable interface. And if the interface A is provided into a
32  * jar files, so you cannot annotate this interface, you may annotate your class as
33  * follows:
34  *
35  * @FractalComponent
36  * @FractalImportedInterface(
37  * interfaces={
38  * @FractalItf("r", signature="java.lang.Runnable"),
39  * @FractalItf("a",signature="A")
40  * }
41  * )
42  * public class MyContentClass implements A,B,C,Runnable {
43  * (...)
44  * }
45  *
46  * This way the @FractalComponent annotation will look after your interfaces B, and C which are interfaces that you provide
47  * with annotations, and the @FractalImportedInterface will look after your interfaces A and java.lang.Runnable.
48  *
49  * @author Nicolas Pessemier <Nicolas.Pessemier@lifl.fr>
50  *
51  */

52 public @interface FractalImportedInterface {
53     /**
54      * The list of annotations @FractalItf to declare
55      */

56     FractalItf[] interfaces();
57 }
58
Popular Tags