public void connect() { IComponent container = _component.getContainer(); for(Iterator it = container.getBindingNames().iterator(); it.hasNext();) { String bindingName = (String) it.next(); connectInformalBinding(container, _component, bindingName); } }
public void connect() { IComponent container = _component.getContainer(); for(Iterator it = container.getBindingNames().iterator(); it.hasNext();) { String bindingName = (String) it.next(); connectInformalBinding(container, _component, bindingName); } }
/** * Returns a sorted list of informal parameter names. This is the list of all bindings, with the * list of parameter names removed, sorted. */ public List getInformalParameterNames() { if (_informalParameterNames != null) return _informalParameterNames; Collection names = _inspectedComponent.getBindingNames(); if (names != null && names.size() > 0) { _informalParameterNames = new ArrayList(names); // Remove the names of any formal parameters. This leaves // just the names of informal parameters (informal parameters // are any parameters/bindings that don't match a formal parameter // name). names = _inspectedSpecification.getParameterNames(); if (names != null) _informalParameterNames.removeAll(names); Collections.sort(_informalParameterNames); } return _informalParameterNames; }
/** * Copys all informal {@link IBinding bindings}from a source component to the destination * component. Informal bindings are bindings for informal parameters. This will overwrite * parameters (formal or informal) in the destination component if there is a naming conflict. */ public static void copyInformalBindings(IComponent source, IComponent destination) { Collection names = source.getBindingNames(); if (names == null) return; IComponentSpecification specification = source.getSpecification(); Iterator i = names.iterator(); while (i.hasNext()) { String name = (String) i.next(); // If not a formal parameter, then copy it over. if (specification.getParameter(name) == null) { IBinding binding = source.getBinding(name); destination.setBinding(name, binding); } } }
/** * Copys all informal {@link IBinding bindings}from a source component to the destination * component. Informal bindings are bindings for informal parameters. This will overwrite * parameters (formal or informal) in the destination component if there is a naming conflict. */ public static void copyInformalBindings(IComponent source, IComponent destination) { Collection names = source.getBindingNames(); if (names == null) return; IComponentSpecification specification = source.getSpecification(); Iterator i = names.iterator(); while (i.hasNext()) { String name = (String) i.next(); // If not a formal parameter, then copy it over. if (specification.getParameter(name) == null) { IBinding binding = source.getBinding(name); destination.setBinding(name, binding); } } }