1 package org.objectweb.fractal.julia.control.binding; 2 3 import org.objectweb.fractal.api.factory.InstantiationException; 4 import org.objectweb.fractal.api.type.ComponentType; 5 import org.objectweb.fractal.api.type.InterfaceType; 6 7 import org.objectweb.fractal.julia.Controller; 8 import org.objectweb.fractal.julia.InitializationContext; 9 10 import java.util.HashMap ; 11 import java.util.Map ; 12 13 24 25 public abstract class TypeBasicBindingMixin implements Controller { 26 27 31 private TypeBasicBindingMixin () { 32 } 33 34 38 46 47 public void initFcController (final InitializationContext ic) 48 throws InstantiationException 49 { 50 ComponentType compType = (ComponentType)ic.type; 51 InterfaceType[] itfTypes = compType.getFcInterfaceTypes(); 52 boolean isComposite = ic.getOptionalInterface("content-controller") != null; 53 54 for (int j = 0; j < itfTypes.length; j++) { 57 InterfaceType itfType = itfTypes[j]; 58 if (!itfType.isFcCollectionItf() && 59 !itfType.getFcItfName().equals("component") && 60 !itfType.getFcItfName().endsWith("-controller") && 61 (itfType.isFcClientItf() || isComposite)) 62 { 63 if (_this_fcBindings == null) { 64 _this_fcBindings = new HashMap (); 65 } 66 _this_fcBindings.put(itfType.getFcItfName(), _this_fcBindings); 67 } 68 } 69 70 _super_initFcController(ic); 72 } 73 74 78 83 84 public Map _this_fcBindings; 85 86 94 95 public abstract void _super_initFcController (InitializationContext ic) 96 throws InstantiationException ; 97 } 98 | Popular Tags |