1 2 package SOFA.SOFAnode.Made.CDL; 3 import java.rmi.RemoteException ; 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 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 |