KickJava   Java API By Example, From Geeks To Geeks.

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


1 /* $Id: CompWstring.java,v 1.2 2004/05/20 14:23:51 bures Exp $ */
2 package SOFA.SOFAnode.Made.CDL;
3 import java.rmi.RemoteException JavaDoc;
4
5 import SOFA.SOFAnode.Made.TIR.CDLRepository;
6 import SOFA.SOFAnode.Made.TIR.CDLType;
7 import SOFA.SOFAnode.Made.TIR.TIRExceptCreate;
8
9 class CompWstring extends CompObjectIm implements CompType {
10   public CompExprOper bound;
11
12   public CompWstring(CompExprOper e) {
13     super(ObjectsKind.o_Wstring);
14     bound = e;
15   }
16
17   public void checkConsist(EnumList props, CompRepository rep) throws CDLExceptCheck, CDLExceptLock, CDLExceptRemote {
18     if (!CompExprOper.testPropInExpr(props, bound.nameProp(rep)))
19       throw new CDLExceptCheck("Unknown property");
20   }
21
22   public CDLType toNormal(CDLRepository newRep) throws CDLExceptRemote, CDLExceptToNormal, CDLExceptLock {
23     try {
24       return newRep.create_wstring(bound.toNormal(newRep));
25     } catch (RemoteException JavaDoc e) {
26       throw new CDLExceptRemote("Remote exception occured: "+e.getMessage());
27     } catch (TIRExceptCreate e) {
28       throw new CDLExceptToNormal("Can't get primitve type\n"+e.getMessage());
29     }
30   }
31 }
32
Popular Tags