KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > SOFA > Connector > EEG > EEM > Elements > LocalSkeletonGen


1 /*
2  * LocalSkeletonGen.java
3  *
4  * Created on 13. duben 2002, 21:08
5  */

6
7 package SOFA.Connector.EEG.EEM.Elements;
8
9 import SOFA.Connector.EEG.CodeWriter.JWriterDirectorException;
10 import SOFA.Connector.EEG.EEM.Actions.JIfaceCN;
11 import SOFA.Connector.EEG.EEM.Actions.JImplWriterDirectorBase;
12 import SOFA.SOFAnode.Made.TIR.OperationDef;
13
14 /**
15  *
16  * @author ghort
17  * @version
18  */

19 public class LocalSkeletonGen extends JImplWriterDirectorBase {
20
21     /** Creates new LocalSkeletonGen */
22     public LocalSkeletonGen(String JavaDoc provIfaceCDL, SOFA.Connector.Property[] params) {
23         super(provIfaceCDL,params);
24     }
25
26     public String JavaDoc[] getImplements() {
27         return new String JavaDoc[] {"SOFA.Connector.EEG.Types.Skeleton"};
28     }
29     
30     public String JavaDoc getClassBody() {
31         return managerTieImpl() + "\n" + linkImpl() + "\n" +
32             "\tpublic SOFA.Connector.TaggedProfile[] getProfiles() {\n"+
33             "\t\treturn new SOFA.Connector.TaggedProfile[] { new SOFA.Connector.ECG.Profiles.LocalProfile(this) };\n"+
34             "\t}\n\n"+
35                         "\tpublic org.objectweb.fractal.api.Type getFcItfType() { return null; }\n"+
36                         "\tpublic boolean isFcInternalItf() {return false; }\n"+
37                         "\tpublic String getFcItfName() { return this.target.getFcItfName(); }\n"+
38                         "\tpublic org.objectweb.fractal.api.Component getFcItfOwner() { return this.target.getFcItfOwner(); }\n\n";
39     }
40
41     public String JavaDoc getMethodDef(OperationDef mt) throws JWriterDirectorException {
42         return JIfaceCN.getMethodDef(mt);
43     }
44
45     public String JavaDoc getMethodBody(OperationDef method) throws JWriterDirectorException {
46         return
47             "\t\t"+declareRet(method,"ret")+"\n"+
48             "\t\t"+assignRet(method,"ret")+targetCall(method,JIfaceCN.targetCallParams(method))+";\n"+
49             "\t\t"+returnRet(method,"ret");
50     }
51 }
52
Popular Tags