1 2 package SOFA.SOFAnode.Made.CDL; 3 4 class CompRequire extends CompContainedIm { 5 CompReffer type; 6 EnumList operations; 7 String typeCode; 8 9 public CompRequire(ID id, CompContainer in, CompRepository inRep, CompReffer t, EnumList op, String tC) { 10 super(ObjectsKind.o_Requires, id, in, inRep); 11 id.version = ((CompContained) in).getIdent().version; 12 type = t; 13 operations = op; 14 typeCode = tC; 15 } 17 18 public void checkConsist(EnumList props, CompRepository rep) throws CDLExceptCheck, CDLExceptLock, CDLExceptRemote { 19 type.checkConsist(props, rep); 20 } 21 22 public boolean isOperation(String name) { 23 return operations.isIn(name); 24 } 25 26 public boolean containsArray() { 27 if (typeCode.indexOf('a')!=-1) 28 return true; 29 return false; 30 } 31 32 35 public String ifaceProtocol() throws CDLExceptLock, CDLExceptRemote { 36 if (typeCode.indexOf('a')==-1) 37 return CompProvide.realIfaceProtocol(type, "!", id.name, rep); 38 else { 39 CompReffer r = CompProvide.getProvReqIface(type.ref, rep); 40 if (r!=null) 41 return CompProvide.realIfaceProtocol(r, "!", id.name, rep); 42 else 43 return null; 44 } 45 } 46 } 47 | Popular Tags |