KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > ccm > IDL3 > Declaration


1 /*====================================================================
2
3 OpenCCM: The Open CORBA Component Model Platform
4 Copyright (C) 2000-2002 USTL - LIFL - GOAL
5 Contact: openccm-team@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.
23 Contributor(s): ______________________________________.
24
25 ====================================================================*/

26
27 package org.objectweb.ccm.IDL3;
28
29 /**
30  * Base interface for IDL3 declarations.
31  *
32  * @author <a=href="Philippe.Merle@lifl.fr">Philippe Merle</a>
33  * <a=href="Mathieu.Vadet@lifl.fr">Mathieu Vadet</a>
34  *
35  * @version 0.3
36  */

37
38 public interface Declaration
39 {
40     //
41
// Parser view of a declaration.
42
//
43
//
44

45     /**
46      * Set the prefix.
47      *
48      * @param prefix The prefix to set. Note that setting the prefix should
49      * only be done when a new prefix (ie different from the
50      * declared-in scope prefix) was explicitly declared.
51      */

52     public void
53     setPrefix(String JavaDoc prefix);
54
55     /**
56      * Set the name.
57      *
58      * @param name The name to set.
59      */

60     public void
61     setName(String JavaDoc name);
62
63     /**
64      * Set the version.
65      *
66      * @param version The version to set.
67      */

68     public void
69     setVersion(String JavaDoc version);
70
71     /**
72      * Set the repository ID.
73      *
74      * @param id The RepositoryId to set.
75      */

76     public void
77     setId(String JavaDoc id);
78
79     /**
80      * Create it into the IR3.
81      */

82     public void
83     create();
84
85     /**
86      * Destroy Declaration in the IR3.
87      */

88     public void
89     destroy();
90
91     //
92
// Visitor view of a declaration.
93
//
94
//
95

96     /**
97      * Obtain the name.
98      *
99      * @return The name of the declaration.
100      */

101     public String JavaDoc
102     getName();
103
104     /**
105      * Obtain the absolute name.
106      *
107      * @return The absolute name of the declaration.
108      */

109     public String JavaDoc
110     getAbsoluteName();
111
112     /**
113      * Obtain the prefix.
114      *
115      * @return The prefix of the declaration or null if there's no prefix.
116      */

117     public String JavaDoc
118     getPrefix();
119
120     /**
121      * Obtain the version.
122      *
123      * @return The version of the declaration.
124      * Note that version "1.0" is assumed as default.
125      */

126     public String JavaDoc
127     getVersion();
128
129     /**
130      * Obtain the repository ID.
131      *
132      * @return The RepositoryId of the declaration.
133      */

134     public String JavaDoc
135     getId();
136
137     /**
138      * Returns the kind of the Declaration object.
139      *
140      * @return The DeclarationKind of the object.
141      */

142     public int
143     getDeclKind();
144
145     /**
146      * Obtain the parent scope.
147      *
148      * @return The parent scope of the declaration
149      * or null if the declaration has no parent.
150      */

151     public Scope
152     getParent();
153
154     /**
155      * Obtain the declaration external dependencies.
156      * Note: for scopes, contained objects are not considered
157      * as dependencies.
158      *
159      * @return The list of dependencies as an array of Declaration.
160      */

161     public Declaration[]
162     getDependencies();
163 }
164
Popular Tags