KickJava   Java API By Example, From Geeks To Geeks.

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


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, Christophe Demarey.
23 Contributor(s): ______________________________________.
24
25 ====================================================================*/

26
27 package org.objectweb.openccm.ast.lib;
28
29 // Package dependencies.
30
import org.objectweb.openccm.ast.api.Delegation;
31
32 /**
33  * DelegationListImpl is a wrapper class for CIDL delegation lists.
34  *
35  *
36  * Inherits from:
37  *
38  * - ListBaseImpl: The base class for all lists.
39  *
40  * - DelegationList: OMG IDL for CIDL delegation lists.
41  *
42  *
43  * @author <a HREF="mailto:Philippe.Merle@lifl.fr">Philippe Merle</a>
44  * <a HREF="mailto:Christophe.Demarey@lifl.fr">Christophe Demarey</a>
45  *
46  * @version 0.1
47  */

48
49 public class DelegationListImpl
50      extends ListBaseImpl
51   implements org.objectweb.openccm.ast.api.DelegationList
52 {
53     // ==================================================================
54
//
55
// Internal state.
56
//
57
// ==================================================================
58

59     // ==================================================================
60
//
61
// Constructor.
62
//
63
// ==================================================================
64

65     /**
66      * The default constructor.
67      */

68     public
69     DelegationListImpl()
70     {
71         // Call the ListBaseImpl constructor.
72
super();
73     }
74
75     // ==================================================================
76
//
77
// Internal methods.
78
//
79
// ==================================================================
80

81     // ==================================================================
82
//
83
// Public methods.
84
//
85
// ==================================================================
86

87     // ==================================================================
88
//
89
// Methods for OMG IDL org.objectweb.openccm.ast.api.DelegationList
90
//
91
// ==================================================================
92

93     /**
94      * Add a delegation.
95      *
96      * @param source - The source name of the delegation.
97      * @param target - The target name of the delegation.
98      */

99     public void
100     add(String JavaDoc source,
101         String JavaDoc target)
102     {
103         super.addObject( new DelegationImpl(source, target) );
104     }
105
106     /**
107      * Obtain all the delegation items.
108      *
109      * @return All the delegation items.
110      */

111     public Delegation[]
112     getDelegations()
113     {
114        return (Delegation[])super.toArray(new Delegation[0]);
115     }
116 }
117
Popular Tags