KickJava   Java API By Example, From Geeks To Geeks.

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


1 /* $Id: CompPrimitive.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 CompPrimitive extends CompObjectIm implements CompType {
10   public int kind;
11   public CompPrimitive(int kind) {
12     super(ObjectsKind.o_Primitive);
13     this.kind = kind;
14   }
15
16   public CDLType toNormal(CDLRepository newRep) throws CDLExceptRemote, CDLExceptToNormal {
17     try {
18       return newRep.get_primitive(kind);
19     } catch (RemoteException JavaDoc e) {
20       throw new CDLExceptRemote("Remote exception occured: "+e.getMessage());
21     } catch (TIRExceptCreate e) {
22       throw new CDLExceptToNormal("Can't get primitve type\n"+e.getMessage());
23     }
24   }
25
26   public void checkConsist(EnumList props, CompRepository rep) {}
27 }
28
Popular Tags