KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > openccm > ast > lib > DeclarationKindImpl


1 /*====================================================================
2
3 OpenCCM: The Open CORBA Component Model Platform
4 Copyright (C) 2000-2004 INRIA & USTL - LIFL - GOAL
5 Contact: openccm@objectweb.org
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Lesser General Public
9 License as published by the Free Software Foundation; either
10 version 2.1 of the License, or any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Lesser General Public License for more details.
16
17 You should have received a copy of the GNU Lesser General Public
18 License along with this library; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20 USA
21
22 Initial developer(s): Philippe Merle, Mathieu Vadet, Christophe Demarey.
23 Contributor(s): ______________________________________.
24
25 ====================================================================*/

26
27 package org.objectweb.openccm.ast.lib;
28
29
30 /**
31  * This class defines kinds of Declaration objects.
32  *
33  * @author <a=href="Philippe.Merle@lifl.fr">Philippe Merle</a>
34  * <a=href="Mathieu.Vadet@lifl.fr">Mathieu Vadet</a>
35  * <a=href="Christophe.Demarey@lifl.fr">Christophe Demarey</a>
36  *
37  * @version 0.3
38  */

39
40 public abstract class DeclarationKindImpl
41            implements org.objectweb.openccm.ast.api.DeclarationKind
42 {
43
44     // ==================================================================
45
//
46
// Public methods.
47
//
48
// ==================================================================
49

50     /**
51      * Retrieve the type in a String format
52      *
53      * @return the type in a String format
54      */

55     public static String JavaDoc
56     toString(long kind)
57     {
58         if( kind == dk_null ){
59             return "null";
60         }else if( kind == dk_module ){
61             return "module";
62         }else if( kind == dk_abstract_interface ){
63             return "abstract_interface";
64         }else if( kind == dk_local_interface ){
65             return "local_interface";
66         }else if( kind == dk_interface ){
67             return "interface";
68         }else if( kind == dk_alias ){
69             return "alias";
70         }else if( kind == dk_attribute ){
71             return "attribute";
72         }else if( kind == dk_constant ){
73             return "constant";
74         }else if( kind == dk_enum ){
75             return "enum";
76         }else if( kind == dk_exception ){
77             return "exception";
78         }else if( kind == dk_native ){
79             return "native";
80         }else if( kind == dk_operation ){
81             return "operation";
82         }else if( kind == dk_struct ){
83             return "struct";
84         }else if( kind == dk_union ){
85             return "union";
86         }else if( kind == dk_value_box ){
87             return "value_box";
88         }else if( kind == dk_value ){
89             return "value";
90         }else if( kind == dk_value_member ){
91             return "value_member";
92         }else if( kind == dk_component ){
93             return "component";
94         }else if( kind == dk_consumes ){
95             return "consumes";
96         }else if( kind == dk_emits ){
97             return "emits";
98         }else if( kind == dk_publishes ){
99             return "publishes";
100         }else if( kind == dk_provides ){
101             return "provides";
102         }else if( kind == dk_uses ){
103             return "uses";
104         }else if( kind == dk_home ){
105             return "home";
106         }else if( kind == dk_factory ){
107             return "factory";
108         }else if( kind == dk_finder ){
109             return "finder";
110         }else if( kind == dk_event ){
111             return "event";
112         }else if( kind == dk_repository ){
113             return "repository";
114         }else if( kind == dk_abstract_storage_home ){
115             return "abstract_storage_home";
116         }else if( kind == dk_abstract_storage_type ){
117             return "abstract_storage_type";
118         }else if( kind == dk_psdl_operation ){
119             return "psdl_operation";
120         }else if( kind == dk_storage_home ){
121             return "storage_home";
122         }else if( kind == dk_storage_home_factory ){
123             return "storage_home_factory";
124         }else if( kind == dk_storage_home_key ){
125             return "storage_home_key";
126         }else if( kind == dk_storage_type ){
127             return "storage_type";
128         }else if( kind == dk_storage_type_state_member ){
129             return "storage_type_state_member";
130         }else if( kind == dk_storage_type_store_directive ){
131             return "storage_type_store_directive";
132         }else if( kind == dk_composition ){
133             return "composition";
134         }else if( kind == dk_executor ){
135             return "executor";
136         }else if( kind == dk_home_executor ){
137             return "home_executor";
138         }else if( kind == dk_proxy_home ){
139             return "proxy_home";
140         }else if( kind == dk_segment ){
141             return "segment";
142         }else{
143             return "null";
144         }
145     }
146 }
147
Popular Tags