KickJava   Java API By Example, From Geeks To Geeks.

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


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  * This class manages IDL valuetype 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 class ValueDeclImpl
39        extends ForwardScopeImpl
40        implements ValueRef, ValueDecl
41 {
42     // ==================================================================
43
//
44
// Internal state.
45
//
46
// ==================================================================
47

48     /**
49      ** Reference to the CORBA 3.0 ValueDef.
50      **/

51     protected org.omg.CORBA.ExtValueDef ext_value_def_;
52
53     /**
54      ** Is it custom?
55      **/

56     protected boolean is_custom_;
57
58     /**
59      ** Is it abstract?
60      **/

61     protected boolean is_abstract_;
62
63     /**
64      ** The base value.
65      **/

66     protected ValueDeclImpl base_value_;
67
68     /**
69      ** Is it truncatable?
70      **/

71     protected boolean is_truncatable_;
72
73     /**
74      ** The abstract base values.
75      **/

76     protected org.objectweb.ccm.util.Vector abstract_base_values_;
77
78     /**
79      ** The supported interfaces.
80      **/

81     protected org.objectweb.ccm.util.Vector supported_interfaces_;
82
83     /**
84      ** The initializers.
85      **/

86     protected org.objectweb.ccm.util.Vector initializers_;
87  
88     // ==================================================================
89
//
90
// Constructor.
91
//
92
// ==================================================================
93

94     /**
95      ** The constructor with the parent scope.
96      **
97      ** @param parent The parent scope of the value declaration.
98      **/

99     public
100     ValueDeclImpl(Repository rep, ScopeImpl parent)
101     {
102         // Call the ForwardScopeImpl constructor.
103
super(rep, parent);
104
105         // Init internal state.
106
ext_value_def_ = null;
107         is_custom_ = false;
108         is_abstract_ = false;
109         base_value_ = null;
110         is_truncatable_ = false;
111         abstract_base_values_ = new org.objectweb.ccm.util.Vector();
112         supported_interfaces_ = new org.objectweb.ccm.util.Vector();
113         initializers_ = new org.objectweb.ccm.util.Vector();
114         the_declaration_kind_ = DeclarationKind._dk_value;
115     }
116
117     // ==================================================================
118
//
119
// Internal methods.
120
//
121
// ==================================================================
122

123     /**
124      ** Obtain the base value.
125      **
126      ** @return The ValueDef of the base value or null if it not exists.
127      **/

128     protected org.omg.CORBA.ExtValueDef
129     getBaseValueDef()
130     {
131         return (base_value_ != null)
132          ? (base_value_.getExtValueDef()) : null;
133     }
134
135     /**
136      ** Loads infos of the CORBA 3.0 ValueDef.
137      **
138      ** @param valueDef The ValueDef to load.
139      **/

140     protected void
141     load(org.omg.CORBA.Contained JavaDoc contained)
142     {
143         ext_value_def_ = org.omg.CORBA.ExtValueDefHelper.narrow(contained);
144         is_custom_ = ext_value_def_.is_custom();
145         is_abstract_ = ext_value_def_.is_abstract();
146         is_truncatable_ = ext_value_def_.is_truncatable();
147         if (ext_value_def_.base_value()!=null)
148             setBaseValue((ValueRef)getRepository().lookupId(ext_value_def_.base_value().id()));
149
150         org.omg.CORBA.ValueDef JavaDoc[] abstract_base_values = ext_value_def_.abstract_base_values();
151         org.omg.CORBA.InterfaceDef JavaDoc[] supported_interfaces = ext_value_def_.supported_interfaces();
152         org.omg.CORBA.ExtInitializer[] initializers = ext_value_def_.ext_initializers();
153
154         // load as scope now to prevent infinite loop in the case
155
// of recursive union.
156
super.load(contained);
157
158         for (int i=0;i<abstract_base_values.length;i++)
159             addAbstractValue(
160                 (ValueRef)getRepository().lookupId(abstract_base_values[i].id()));
161
162         for (int i=0;i<supported_interfaces.length;i++)
163             addInterface(
164                 (InterfaceRef)getRepository().lookupId(supported_interfaces[i].id()));
165
166         Initializer initializer;
167         for (int i=0;i<initializers.length;i++)
168         {
169             initializer = startInitializer(initializers[i].name);
170             initializers_.add(initializer);
171             org.omg.CORBA.StructMember JavaDoc[] params = initializers[i].members;
172             for (int j=0;j<params.length;j++)
173             {
174                 initializer.addInParam(params[j].name,
175                                        getRepository().getAsTypeRef(params[j].type_def));
176             }
177         }
178     }
179
180     /**
181      ** Loads infos of the CORBA 3.0 ValueDef.
182      **
183      ** @param valueDef The ValueDef to load.
184      **/

185     protected void
186     loadAsMapping(org.omg.CORBA.Contained JavaDoc contained)
187     {
188         ext_value_def_ = org.omg.CORBA.ExtValueDefHelper.narrow(contained);
189         is_custom_ = ext_value_def_.is_custom();
190         is_abstract_ = ext_value_def_.is_abstract();
191         is_truncatable_ = ext_value_def_.is_truncatable();
192         if (ext_value_def_.base_value()!=null)
193             setBaseValue((ValueRef)getRepository().lookupMappedId(ext_value_def_.base_value().id()));
194
195         org.omg.CORBA.ValueDef JavaDoc[] abstract_base_values = ext_value_def_.abstract_base_values();
196         org.omg.CORBA.InterfaceDef JavaDoc[] supported_interfaces = ext_value_def_.supported_interfaces();
197         org.omg.CORBA.ExtInitializer[] initializers = ext_value_def_.ext_initializers();
198
199         // load as scope now to prevent infinite loop in the case
200
// of recursive union.
201
super.loadAsMapping(contained);
202
203         for (int i=0;i<abstract_base_values.length;i++)
204             addAbstractValue(
205                 (ValueRef)getRepository().lookupMappedId(abstract_base_values[i].id()));
206
207         for (int i=0;i<supported_interfaces.length;i++)
208             addInterface(
209                 (InterfaceRef)getRepository().lookupMappedId(supported_interfaces[i].id()));
210
211         Initializer initializer;
212         for (int i=0;i<initializers.length;i++)
213         {
214             initializer = startInitializer(initializers[i].name);
215             initializers_.add(initializer);
216             org.omg.CORBA.StructMember JavaDoc[] params = initializers[i].members;
217             for (int j=0;j<params.length;j++)
218             {
219                 initializer.addInParam(params[j].name,
220                                        getRepository().getAsMappedTypeRef(params[j].type_def));
221             }
222         }
223     }
224
225     // ==================================================================
226
//
227
// Methods for the Declaration interface.
228
//
229
// ==================================================================
230

231     /**
232      ** Find a declaration.
233      **
234      ** Note that the declaration is also recursively searched in the
235      ** parent scope.
236      **
237      ** @param name The name of the searched declaration.
238      **
239      ** @return The declaration that was searched
240      ** or null if it does not exist.
241      **/

242     public Declaration
243     find(String JavaDoc name)
244     {
245         // Finds in the current scope.
246
Declaration decl = super.find(name);
247         // If found then returns it.
248
if(decl != null) return decl;
249
250         // If not found then finds in base value.
251
if(base_value_ != null)
252         {
253             decl = base_value_.find(name);
254             // If found then returns it.
255
if(decl != null) return decl;
256         }
257
258         // If not found then finds in abstract values.
259
for(int i=0; i<abstract_base_values_.size(); i++)
260         {
261             decl = ((ValueDeclImpl)(abstract_base_values_.get(i))).find(name);
262             // If found then returns it.
263
if(decl != null) return decl;
264         }
265
266         // If not found then finds in supported interfaces.
267
for(int i=0; i<supported_interfaces_.size(); i++)
268         {
269             decl = ((InterfaceDeclImpl)(supported_interfaces_.get(i))).find(name);
270             // If found then returns it.
271
if(decl != null) return decl;
272         }
273
274         // Else not found.
275
return null;
276     }
277
278     /**
279      ** Obtain the declaration external dependencies.
280      ** Note: for scopes, contained objects are not considered
281      ** as dependencies.
282      **
283      ** @return The list of dependencies as an array of Declaration.
284      **/

285     public Declaration[]
286     getDependencies()
287     {
288         if (dependencies_!=null)
289             return dependencies_;
290
291         dependencies_ = new Declaration[0];
292         org.objectweb.ccm.util.Vector value_depend = new org.objectweb.ccm.util.Vector();
293         Declaration[] depend = null;
294
295         // base value
296
if (getBaseValue()!=null)
297         {
298             value_depend.add(getBaseValue());
299             depend = getBaseValue().getDependencies();
300             for (int j=0;j<depend.length;j++)
301             {
302                 if (depend[j]!=this)
303                     value_depend.add(depend[j]);
304             }
305         }
306
307         // abstract base values
308
ValueDecl[] abs = getAbstractValues();
309         for (int i=0;i<abs.length;i++)
310         {
311             value_depend.add(abs[i]);
312             depend = abs[i].getDependencies();
313             for (int j=0;j<depend.length;j++)
314             {
315                 if ((depend[j]!=this) &&
316                     (value_depend.indexOf(depend[j])==-1))
317                     value_depend.add(depend[j]);
318             }
319         }
320
321         // supported interfaces
322
InterfaceDecl[] supp = getSupportedInterfaces();
323         for (int i=0;i<supp.length;i++)
324         {
325             value_depend.add(supp[i]);
326             depend = supp[i].getDependencies();
327             for (int j=0;j<depend.length;j++)
328             {
329                 if ((depend[j]!=this) &&
330                     (value_depend.indexOf(depend[j])==-1))
331                     value_depend.add(depend[j]);
332             }
333         }
334
335         // initializers
336
Initializer[] inits = getInitializers();
337         for (int i=0;i<inits.length;i++)
338         {
339             TypeRef[] param_types = inits[i].getParameters().getParamTypes();
340             for (int j=0;j<param_types.length;j++)
341             {
342                 depend = param_types[j].getDependencies();
343                 for (int k=0;k<depend.length;k++)
344                 {
345                     if ((!containsDecl(depend[k])) &&
346                         (depend[k]!=this) &&
347                         (value_depend.indexOf(depend[k])==-1))
348                         value_depend.add(depend[k]);
349                 }
350             }
351         }
352
353         // contents
354
Declaration[] decls = getContents(true, org.objectweb.ccm.IDL3.DeclarationKind._dk_all);
355         for (int i=0;i<decls.length;i++)
356         {
357             depend = decls[i].getDependencies();
358             for (int j=0;j<depend.length;j++)
359             {
360                 if ((!containsDecl(depend[j])) &&
361                     (depend[j]!=this) &&
362                     (value_depend.indexOf(depend[j])==-1))
363                     value_depend.add(depend[j]);
364             }
365         }
366
367         dependencies_ = (Declaration[])value_depend.toArray(new Declaration[0]);
368         return dependencies_;
369     }
370
371     // ==================================================================
372
//
373
// Methods for the Scope interface.
374
//
375
// ==================================================================
376

377     // ==================================================================
378
//
379
// Methods for the TypeRef interface.
380
//
381
// ==================================================================
382

383     /**
384      ** Obtain its IDLType reference.
385      **
386      ** @return The IDLType associated with the value declaration.
387      **/

388     public org.omg.CORBA.IDLType JavaDoc
389     getIDLType()
390     {
391         return ext_value_def_;
392     }
393
394     /**
395      **
396      **/

397     public int
398     getTypeKind()
399     {
400         return TypeKind._tk_value;
401     }
402
403     // ==================================================================
404
//
405
// Methods for the ValueRef interface.
406
//
407
// ==================================================================
408

409     /**
410      ** Obtain its ValueDef reference.
411      **
412      ** @return The ValueDef associated with the value declaration.
413      **/

414     public org.omg.CORBA.ExtValueDef
415     getExtValueDef()
416     {
417         return ext_value_def_;
418     }
419
420     /**
421      ** Obtain its ValueDef reference.
422      **
423      ** @return The ValueDef associated with the value declaration.
424      **/

425     public org.omg.CORBA.ValueDef JavaDoc
426     getValueDef()
427     {
428         return ext_value_def_;
429     }
430
431     // ==================================================================
432
//
433
// Methods for the ValueDecl interface (parser view).
434
//
435
// ==================================================================
436

437     /**
438      ** Set as custom.
439      **/

440     public void
441     setCustom()
442     {
443         is_custom_ = true;
444     }
445
446     /**
447      ** Set as abstract.
448      **/

449     public void
450     setAbstract()
451     {
452         is_abstract_ = true;
453     }
454
455     /**
456      ** Set as truncatable.
457      **/

458     public void
459     setTruncatable()
460     {
461         is_truncatable_ = true;
462     }
463
464     /**
465      ** Set the base value.
466      **
467      ** @param value The base value.
468      **/

469     public void
470     setBaseValue(ValueRef value)
471     {
472         if(value != null)
473         {
474             base_value_ = (ValueDeclImpl)value;
475             base_value_.addRef();
476         }
477     }
478
479     /**
480      ** Add a initializer (factory declaration).
481      **
482      ** @param init The initializer.
483      **/

484     public void
485     addInitializer(Initializer init)
486     {
487         initializers_.add(init);
488     }
489
490     /**
491      ** Add an abstract base value.
492      **
493      ** @param value The abstract base value.
494      **/

495     public void
496     addAbstractValue(ValueRef value)
497     {
498         if(value != null)
499         {
500             value.addRef();
501             abstract_base_values_.add(value);
502         }
503     }
504
505     /**
506      ** Add a supported interface.
507      **
508      ** @param itf The supported interface.
509      **/

510     public void
511     addInterface(InterfaceRef itf)
512     {
513         if(itf != null)
514         {
515             itf.addRef();
516             supported_interfaces_.add(itf);
517         }
518     }
519
520     // ==================================================================
521
//
522
// Methods for the ValueDecl interface (visitor view).
523
//
524
// ==================================================================
525

526     /**
527      **
528      **/

529     public boolean
530     isCustom()
531     {
532         return is_custom_;
533     }
534
535     /**
536      **
537      **/

538     public boolean
539     isAbstract()
540     {
541         return is_abstract_;
542     }
543
544     /**
545      **
546      **/

547     public boolean
548     isTruncatable()
549     {
550         return is_truncatable_;
551     }
552
553     /**
554      **
555      **/

556     public boolean
557     isPrimaryKey()
558     {
559         boolean is_pk = false;
560         ValueDecl[] abs = getAbstractValues();
561         for (int i=0;i<abs.length;i++)
562         {
563             if (abs[i].getAbsoluteName().equals("::Components::PrimaryKeyBase"))
564                 return true;
565
566             is_pk = abs[i].isPrimaryKey();
567             if (is_pk)
568                 return true;
569         }
570
571         if (getBaseValue()!=null)
572             is_pk = getBaseValue().isPrimaryKey();
573
574         return is_pk;
575     }
576
577     /**
578      **
579      **/

580     public ValueDecl
581     getBaseValue()
582     {
583         return base_value_;
584     }
585
586     /**
587      **
588      **/

589     public ValueDecl[]
590     getAbstractValues()
591     {
592         ValueDecl[] result = new ValueDecl[abstract_base_values_.size()];
593         for (int i=0;i<result.length;i++)
594         {
595             result[i] = (ValueDecl)abstract_base_values_.get(i);
596         }
597         return result;
598     }
599
600     /**
601      **
602      **/

603     public InterfaceDecl[]
604     getSupportedInterfaces()
605     {
606         InterfaceDecl[] result = new InterfaceDecl[supported_interfaces_.size()];
607         for (int i=0;i<result.length;i++)
608         {
609             result[i] = (InterfaceDecl)supported_interfaces_.get(i);
610         }
611         return result;
612     }
613
614     /**
615      **
616      **/

617     public Initializer[]
618     getInitializers()
619     {
620         Initializer[] result = new Initializer[initializers_.size()];
621         for (int i=0;i<result.length;i++)
622         {
623             result[i] = (Initializer)initializers_.get(i);
624         }
625         return result;
626     }
627
628     // ==================================================================
629
//
630
// Methods for the inherited DeclarationImpl class.
631
//
632
// ==================================================================
633

634     /**
635      **
636      **/

637     public void
638     destroy()
639     {
640         if (base_value_!=null)
641             base_value_.removeRef();
642
643         for (int i=0;i<abstract_base_values_.size();i++)
644         {
645             ((ValueRef)abstract_base_values_.get(i)).removeRef();
646         }
647         for (int i=0;i<supported_interfaces_.size();i++)
648         {
649             ((InterfaceRef)supported_interfaces_.get(i)).removeRef();
650         }
651         for (int i=0;i<initializers_.size();i++)
652         {
653             ((InitializerImpl)initializers_.get(i)).destroy();
654         }
655         super.destroy();
656     }
657
658     /**
659      ** Obtain its CORBA 3.0 Contained reference.
660      **
661      ** @return The Contained object associated with the value declaration.
662      **/

663     protected org.omg.CORBA.Contained JavaDoc
664     getContained()
665     {
666        return ext_value_def_;
667     }
668
669     // ==================================================================
670
//
671
// Methods for the inherited ScopeImpl class.
672
//
673
// ==================================================================
674

675     /**
676      ** Obtain its CORBA 3.0 Container reference.
677      **
678      ** @return The Container object associated with the value declaration.
679      **/

680     protected org.omg.CORBA.Container JavaDoc
681     getContainer()
682     {
683         return ext_value_def_;
684     }
685
686     /**
687      ** Create an attribute definition.
688      **
689      ** @param attribute The attribute declaration.
690      ** @param type The IDLType of the attribute.
691      ** @param mode The mode of the attribute.
692      ** @param get_exceptions An array containing the exceptions that
693      ** the accessor method can raise.
694      ** @param put_exceptions An array containing the exceptions that
695      ** the mutator method can raise.
696      **
697      ** @return The new created AttributeDef.
698      **/

699     protected org.omg.CORBA.ExtAttributeDef
700     createExtAttribute(AttributeDecl attribute,
701                        org.omg.CORBA.IDLType JavaDoc type,
702                        org.omg.CORBA.AttributeMode JavaDoc mode,
703                        org.omg.CORBA.ExceptionDef JavaDoc[] get_exceptions,
704                        org.omg.CORBA.ExceptionDef JavaDoc[] set_exceptions)
705     {
706         // Create an AttributeDef into the IFR!;
707
org.omg.CORBA.ExtAttributeDef ext_attribute_def =
708             getExtValueDef().create_ext_attribute(attribute.getId(),
709                                                   attribute.getName(),
710                                                   attribute.getVersion(),
711                                                   type, mode,
712                                                   get_exceptions,
713                                                   set_exceptions);
714         return ext_attribute_def;
715     }
716
717     /**
718      ** Create an operation
719      **
720      ** @param operation The operation declaration.
721      ** @param type The IDLType of the object that the operations returns.
722      ** @param mode The mode of the operation ie normal or oneway.
723      ** @param params An array containing the parameters description.
724      ** @param exceptions An array containing the exceptions that
725      ** the operation can raise.
726      ** @param contexts An array containing the possible context values.
727      **
728      ** @return The new created OperationDef.
729      **/

730     protected org.omg.CORBA.OperationDef JavaDoc
731     createOperation(OperationDecl operation,
732                     org.omg.CORBA.IDLType JavaDoc type,
733                     org.omg.CORBA.OperationMode JavaDoc mode,
734                     org.omg.CORBA.ParameterDescription JavaDoc[] params,
735                     org.omg.CORBA.ExceptionDef JavaDoc[] exceptions,
736                     String JavaDoc[] contexts)
737     {
738         // Create an OperationDef into the IFR.
739
org.omg.CORBA.OperationDef JavaDoc operation_def =
740             getExtValueDef().create_operation(operation.getId(),
741                                               operation.getName(),
742                                               operation.getVersion(),
743                                               type, mode,
744                                               params,
745                                               exceptions,
746                                               contexts);
747         return operation_def;
748     }
749
750     /**
751      ** To obtain all the contained Declaration objects.
752      **
753      ** @param exclude_inherited If false return also objects contained in inherited scopes.
754      ** @param limited_types A logical combination of DeclarationKind.
755      **
756      ** @return An array of Declaration objects.
757      **/

758     public Declaration[]
759     getContents(boolean exclude_inherited, int limited_types)
760     {
761         if (exclude_inherited)
762             return super.getContents(exclude_inherited, limited_types);
763
764         Declaration[] res = super.getContents(exclude_inherited, limited_types);
765         InterfaceDecl[] itfs = getSupportedInterfaces();
766         for (int i=0;i<itfs.length;i++)
767         {
768             Declaration[] tmp1 = itfs[i].getContents(exclude_inherited, limited_types);
769             Declaration[] tmp2 = res;
770             res = new Declaration[tmp1.length+tmp2.length];
771             System.arraycopy(tmp2, 0, res, 0, tmp2.length);
772             System.arraycopy(tmp1, 0, res, tmp2.length, tmp1.length);
773         }
774         ValueDecl[] vals = getAbstractValues();
775         for (int i=0;i<vals.length;i++)
776         {
777             Declaration[] tmp1 = vals[i].getContents(exclude_inherited, limited_types);
778             Declaration[] tmp2 = res;
779             res = new Declaration[tmp1.length+tmp2.length];
780             System.arraycopy(tmp2, 0, res, 0, tmp2.length);
781             System.arraycopy(tmp1, 0, res, tmp2.length, tmp1.length);
782         }
783         if (base_value_==null)
784             return res;
785
786         Declaration[] tmp1 = base_value_.getContents(exclude_inherited, limited_types);
787         Declaration[] tmp2 = res;
788         res = new Declaration[tmp1.length+tmp2.length];
789         System.arraycopy(tmp2, 0, res, 0, tmp2.length);
790         System.arraycopy(tmp1, 0, res, tmp2.length, tmp1.length);
791         return res;
792     }
793
794     // ==================================================================
795
//
796
// Methods for the inherited ForwardScopeImpl class.
797
//
798
// ==================================================================
799

800     /**
801      ** Create the container object.
802      **/

803     protected void
804     createContainer()
805     {
806         org.omg.CORBA.ValueDef JavaDoc[] abstract_base_values =
807         new org.omg.CORBA.ValueDef JavaDoc[abstract_base_values_.size()];
808         for(int i=0; i<abstract_base_values.length; i++)
809         {
810             abstract_base_values[i] = ((ValueDeclImpl)(abstract_base_values_.get(i))).getExtValueDef();
811         }
812
813         org.omg.CORBA.InterfaceDef JavaDoc[] supported_interfaces =
814         new org.omg.CORBA.InterfaceDef JavaDoc[supported_interfaces_.size()];
815         for(int i=0; i<supported_interfaces.length; i++)
816         {
817             supported_interfaces[i] =
818                 ((InterfaceDeclImpl)(supported_interfaces_.get(i))).getExtInterfaceDef();
819         }
820
821         // Create a ValueDef into the IFR.
822
ext_value_def_ = the_parent_.getContainer().create_ext_value(getId(), getName(), getVersion(),
823                                                                      is_custom_, is_abstract_,
824                                                                      getBaseValueDef(),
825                                                                      is_truncatable_,
826                                                                      abstract_base_values,
827                                                                      supported_interfaces,
828                                                                      new org.omg.CORBA.ExtInitializer[0]);
829     }
830
831     /**
832      ** Complete the container object.
833      **/

834     protected void
835     completeContainer()
836     {
837         org.omg.CORBA.ValueDef JavaDoc base_value = getBaseValueDef();
838         if(base_value != null)
839             getExtValueDef().base_value(base_value);
840
841         org.omg.CORBA.ValueDef JavaDoc[] abstract_base_values =
842         new org.omg.CORBA.ValueDef JavaDoc[abstract_base_values_.size()];
843         for(int i=0; i<abstract_base_values.length; i++)
844         {
845             abstract_base_values[i] =
846                 ((ValueDeclImpl)(abstract_base_values_.get(i))).getExtValueDef();
847         }
848
849         if(abstract_base_values.length != 0)
850             getExtValueDef().abstract_base_values(abstract_base_values);
851
852         org.omg.CORBA.InterfaceDef JavaDoc[] supported_interfaces =
853         new org.omg.CORBA.InterfaceDef JavaDoc[supported_interfaces_.size()];
854         for(int i=0; i<supported_interfaces.length; i++)
855         {
856             supported_interfaces[i] =
857                 ((InterfaceDeclImpl)(supported_interfaces_.get(i))).getExtInterfaceDef();
858         }
859
860         if(supported_interfaces.length != 0)
861             getExtValueDef().supported_interfaces(supported_interfaces);
862
863         org.omg.CORBA.ExtInitializer[] initializers =
864         new org.omg.CORBA.ExtInitializer[initializers_.size()];
865         for(int i=0; i<initializers.length; i++)
866         {
867             initializers[i] =
868                 ((InitializerImpl)(initializers_.get(i))).getExtInitializer();
869         }
870
871         if(initializers.length != 0)
872             getExtValueDef().ext_initializers(initializers);
873     }
874 }
875
Popular Tags