/** * Calls the overriden method and then sets the attributes of the created * component. The attributes of the created component are initialized from the * attributes name of this template, if the template has a {@link * CloneableAttributeController} interface, and if the created component has * an {@link org.objectweb.fractal.api.control.AttributeController} interface * (otherwise this mixin does nothing). * * @return the instantiated component. * @throws InstantiationException if the component controller cannot be * instantiated. */ public Component newFcControllerInstance () throws InstantiationException { Component comp = _super_newFcControllerInstance(); if (_this_weaveableOptCAC != null) { // copies the template's attributes into the component, if applicable try { _this_weaveableOptCAC.cloneFcAttributes( (AttributeController)comp.getFcInterface("attribute-controller")); } catch (NoSuchInterfaceException ignored) { } } return comp; }
/** * Calls the overriden method and then sets the attributes of the created * component. The attributes of the created component are initialized from the * attributes name of this template, if the template has a {@link * CloneableAttributeController} interface, and if the created component has * an {@link org.objectweb.fractal.api.control.AttributeController} interface * (otherwise this mixin does nothing). * * @return the instantiated component. * @throws InstantiationException if the component controller cannot be * instantiated. */ public Component newFcControllerInstance () throws InstantiationException { Component comp = _super_newFcControllerInstance(); if (_this_weaveableOptCAC != null) { // copies the template's attributes into the component, if applicable try { _this_weaveableOptCAC.cloneFcAttributes( (AttributeController)comp.getFcInterface("attribute-controller")); } catch (NoSuchInterfaceException ignored) { } } return comp; }