KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > SOFA > SOFAnode > Made > CDL > CompUnionMember


1 /* $Id: CompUnionMember.java,v 1.1.1.1 2003/02/11 16:19:40 bures Exp $ */
2 package SOFA.SOFAnode.Made.CDL;
3
4 class CompUnionMember extends CompContainedIm {
5   public CompType tp;
6   public List labels;
7
8   public CompUnionMember(ID name, CompContainer parent, CompRepository rep, CompType t, List lb) {
9     super(ObjectsKind.o_UnionMember, name, parent, rep);
10     id.version = ((CompContained)parent).getIdent().version;
11     tp = t;
12     labels = lb;
13   }
14
15   public void checkConsist(EnumList props, CompRepository rep) throws CDLExceptCheck, CDLExceptLock, CDLExceptRemote {
16     tp.checkConsist(props, rep);
17     labels.toFirst();
18     for (int i=0;i<labels.size();i++) {
19       if (!CompExprOper.testPropInExpr(props, ((CompExprOper) labels.aktual()).nameProp(rep)))
20         throw new CDLExceptCheck("Unknown property");
21     }
22   }
23 }
24
Popular Tags