KickJava   Java API By Example, From Geeks To Geeks.

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


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 import spoon.aval.annotation.structure.AValTarget;
23 import spoon.aval.annotation.value.Matches;
24 import spoon.aval.annotation.value.Unique;
25 import spoon.reflect.declaration.CtInterface;
26
27 /**
28  * An annotation to generate Fractal-ADL files for Fractal interfaces
29  * @author Nicolas Pessemier <Nicolas.Pessemier@lifl.fr>
30  *
31  */

32 @AValTarget(CtInterface.class)
33 public @interface FractalItf {
34     /**
35      *
36      * @return the name of the Fractal interface
37      */

38     @Unique String JavaDoc name();
39     
40     /**
41      *
42      * @return the java signature of the Fractal interface
43      */

44     Class JavaDoc signature() default Void JavaDoc.class;
45     
46     /**
47      *
48      * @return the cardinality["singleton"/"collection"] of the Fractal interface
49      */

50     @Matches("(singleton|collection)") String JavaDoc cardinality() default "singleton";
51     /**
52      *
53      * @return the contingency["mandatory"/"optional"] of the Fractal interface
54      */

55     @Matches("(mandatory|optional)") String JavaDoc contingency() default "mandatory";
56     
57     
58     
59 }
60
Popular Tags