1 23 24 package org.objectweb.fractal.julia.control.content; 25 26 import org.objectweb.fractal.api.Component; 27 import org.objectweb.fractal.api.NoSuchInterfaceException; 28 import org.objectweb.fractal.api.control.ContentController; 29 import org.objectweb.fractal.api.type.ComponentType; 30 import org.objectweb.fractal.api.type.InterfaceType; 31 32 import org.objectweb.fractal.julia.ChainedNoSuchInterfaceException; 33 import org.objectweb.fractal.julia.ComponentInterface; 34 35 import java.util.Map ; 36 37 49 50 public abstract class TypeContentMixin implements ContentController { 51 52 56 private TypeContentMixin () { 57 } 58 59 63 74 75 public Object getFcInternalInterface (final String interfaceName) 76 throws NoSuchInterfaceException 77 { 78 ComponentType compType = (ComponentType)_this_weaveableC.getFcType(); 79 InterfaceType itfType; 80 try { 81 itfType = compType.getFcInterfaceType(interfaceName); 82 } catch (NoSuchInterfaceException e) { 83 throw new ChainedNoSuchInterfaceException( 84 null, _this_weaveableC, interfaceName); 85 } 86 Object result; 87 try { 88 result = _super_getFcInternalInterface(interfaceName); 89 } catch (NoSuchInterfaceException e) { 90 if (itfType.isFcCollectionItf()) { 91 String collectionName = "/collection/" + itfType.getFcItfName(); 92 result = _super_getFcInternalInterface(collectionName); 93 result = ((ComponentInterface)result).clone(); 94 ((ComponentInterface)result).setFcItfName(interfaceName); 95 _this_fcInternalInterfaces.put(interfaceName, result); 96 } else { 97 throw e; 98 } 99 } 100 return result; 101 } 102 103 107 112 113 public Component _this_weaveableC; 114 115 119 120 public Map _this_fcInternalInterfaces; 121 122 132 133 public abstract Object _super_getFcInternalInterface (String interfaceName) 134 throws NoSuchInterfaceException ; 135 } 136 | Popular Tags |