1 23 24 package org.objectweb.fractal.adl.bindings; 25 26 import java.io.PrintWriter ; 27 import java.util.Map ; 28 29 34 35 public class StaticFractalBindingBuilder implements BindingBuilder { 36 37 41 public void bindComponent ( 42 final int type, 43 final Object client, 44 final String clientItf, 45 final Object server, 46 final String serverItf, 47 final Object context) throws Exception 48 { 49 PrintWriter pw = (PrintWriter )((Map )context).get("printwriter"); 50 pw.print("Fractal.getBindingController("); 51 pw.print(client); 52 pw.print(").bindFc(\""); 53 pw.print(clientItf); 54 pw.print("\", "); 55 if (type == IMPORT_BINDING) { 56 pw.print("Fractal.getContentController("); 57 pw.print(server); 58 pw.print(").getFcInternalInterface(\""); 59 pw.print(serverItf); 60 pw.print("\")"); 61 } else { 62 pw.print(server); 63 pw.print(".getFcInterface(\""); 64 pw.print(serverItf); 65 pw.print("\")"); 66 } 67 pw.println(");"); 68 } 69 } 70 71 | Popular Tags |