KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > openccm > Containers > MetaInformation > HomeTypeImpl


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

28
29 package org.objectweb.openccm.Containers.MetaInformation;
30
31 /**
32  * @author hameau
33  */

34 public class HomeTypeImpl
35 extends TypeImpl
36 implements HomeType {
37
38   // internal parameters
39

40   protected ContainerType _container_type;
41   protected InterfaceTypeList _supported_interfaces;
42   protected AttributeTypeList _attribute_type_list;
43   protected InterfaceType _equivalent_interface;
44   
45   /**
46    *
47    */

48   public HomeTypeImpl()
49   {
50     _container_type = null;
51     _equivalent_interface = null;
52     _supported_interfaces = new InterfaceTypeListImpl();
53     _attribute_type_list = new AttributeTypeListImpl();
54   }
55   
56     public ContainerType container_type()
57   {
58     return _container_type;
59   }
60
61   /* (non-Javadoc)
62    * @see org.objectweb.openccm.Containers.MetaInformation.HomeTypeOperations#supported_interfaces()
63    */

64   public InterfaceTypeList supported_interfaces()
65   {
66     return _supported_interfaces;
67   }
68
69   /* (non-Javadoc)
70    * @see org.objectweb.openccm.Containers.MetaInformation.HomeTypeOperations#attribute_type_list()
71    */

72   public AttributeTypeList attribute_type_list()
73   {
74     return _attribute_type_list;
75   }
76
77   /* (non-Javadoc)
78    * @see org.objectweb.openccm.Containers.MetaInformation.HomeTypeOperations#create_home_instance()
79    */

80   public HomeInstance create_home_instance()
81   {
82     // creating a new 'empty' home instance
83

84     HomeInstance _tmp_home_inst = new HomeInstanceImpl();
85     
86     // fill its attribute
87

88     // related instance kind is component instance
89
_tmp_home_inst.related_instance_kind(instance_kind.COMPONENT_INSTANCE);
90     
91     // TODO reference must be set afterwards !!!
92
_tmp_home_inst.home_ref(null);
93     // link to its home type
94
_tmp_home_inst.type_reference(this);
95     
96   // System.err.println("### DEBUG home instance created for " + this._name);
97

98     return _tmp_home_inst;
99   }
100
101   /* (non-Javadoc)
102    * @see org.objectweb.openccm.Containers.MetaInformation.HomeTypeOperations#equivalent_interface()
103    */

104   public InterfaceType equivalent_interface()
105   {
106     return _equivalent_interface;
107   }
108
109  }
110
Popular Tags