Browses recursively the components in order to find components with the name.

@param name the component's name.
@param components components to browse.
@return the first component with the name.
10813
protected Component lookForComponent(String name, ObservableList<Node> components) {
        for (int i = 0; i < components.size() && !mFindWithEqual; i++) {
            //String componentName = ComponentNamer.getInstance().getNameForComponent(components[c]);
            Node c = components.get(i);
            checkName(name, c);
            if (!mFindWithEqual) {
                if (c instanceof Parent) {
                    Component result = lookForComponent(name, ((Parent) c).getChildrenUnmodifiable());
                    if (result != null) {
                        return result;
                    }
                }
            }
        }
        return null;
    }
429875
def _get_traversal_children(self, name):
        
        name = name.upper()
        parts = name.split('_')
        try:
            assert 3 <= len(parts) <= 4
            prefix = "{0}_{1}".format(parts[0], parts[1])
            component = int(parts[2])
            subcomponent = int(parts[3]) if len(parts) == 4 else None
        except (AssertionError, ValueError):
            return None, None
        else:
            if prefix != self.name:
                return None, None
        return component, subcomponent
1134130
public @Nullable <T> T get(@NotNull String name, @NotNull Class<T> type) {
    return getForComponent(component, name, type);
  }
781876
public List<RawComponent> getExperimentalComponents(String name) {
		/*
		 * Note: The returned list is not backed by the parent component because
		 * this would allow RawComponent objects without the specified name to
		 * be added to the list.
		 */
		List<RawComponent> toReturn = new ArrayList<RawComponent>();
		for (RawComponent component : getExperimentalComponents()) {
			if (component.getName().equalsIgnoreCase(name)) {
				toReturn.add(component);
			}
		}
		return Collections.unmodifiableList(toReturn);
	}
1274341
private void initComponents(List<CmsSetupComponent> components) {

        for (CmsSetupComponent component : components) {
            CheckBox checkbox = new CheckBox();
            checkbox.setValue(component.isChecked());
            checkbox.setCaption(component.getName() + " - " + component.getDescription());
            checkbox.setDescription(component.getDescription());
            checkbox.setData(component);
            checkbox.setWidth("100%");
            m_components.addComponent(checkbox);
            m_componentCheckboxes.add(checkbox);
            m_componentMap.put(component.getId(), component);

        }
    }
744172
@Override
	public List<Component> findComponentChildren( String applicationName, String componentName ) {

		if( componentName == null )
			this.logger.fine( "Request: list root components in " + applicationName + "." );
		else
			this.logger.fine( "Request: find components that can be deployed under a " + componentName + " component in " + applicationName + "." );

		List<Component> result = new ArrayList<> ();
		Application app = this.manager.applicationMngr().findApplicationByName( applicationName );
		if( app != null ) {
			Component comp;
			if( componentName == null )
				result.addAll( app.getTemplate().getGraphs().getRootComponents());
			else if(( comp = ComponentHelpers.findComponent( app, componentName )) != null )
				result.addAll( ComponentHelpers.findAllChildren( comp ));
			else
				this.logger.fine( "No component called " + componentName + " was found in " + applicationName + "." );
		}

		return result;
	}
771612
public NodeConfig getChildNodeByName(String name) {
		if (name == null) {
			throw new NullPointerException("Node name is null");
		}
		if (childrenNodes != null && childrenNodes.size() > 0) {
			for (NodeConfig childNode : childrenNodes) {
				if (childNode.getName().equals(name)) {
					return childNode;
				}
			}
		}
		return null;
	}
842130
function getComponentByFullName(name) {
  let componentType = name.substr(0, name.indexOf('.')).toLowerCase(),
    compName = name.substr(name.indexOf('.') + 1);
  switch (componentType) {
    case 'store':
      return this.store(compName);
    case 'transport':
      return this.transport(compName);
    case 'library':
      return this.lib(compName);
    case 'plugin':
      return this.plugin(compName);
    case 'module':
      return this.module(compName);
    default:
      return null;
  }
}
476663
public RawComponent getExperimentalComponent(String name) {
		for (RawComponent component : getExperimentalComponents()) {
			if (component.getName().equalsIgnoreCase(name)) {
				return component;
			}
		}
		return null;
	}
1325342
function getComponentName (componentPath) {
  if (!componentPath) {
    return null
  }
  let component = COMPONENTS.find(({ path }) => {
    path = normalize(path)
    return path === componentPath || path.split('.')[0] === componentPath
  })

  return component ? component.name : null
}
1277419
public static List<Instance> findInstancesByComponentName( AbstractApplication application, String componentName ) {

		List<Instance> result = new ArrayList<> ();
		for( Instance inst : getAllInstances( application )) {
			if( componentName.equals( inst.getComponent().getName()))
				result.add( inst );
		}

		return result;
	}
924603
private Class findClassInComponents(String name)
        throws ClassNotFoundException {
        // we need to search the components of the path to see if
        // we can find the class we want.
        String classFilename = getClassFilename(name);
        Enumeration e = pathComponents.elements();
        while (e.hasMoreElements()) {
            File pathComponent = (File) e.nextElement();
            try (final InputStream stream = getResourceStream(pathComponent, classFilename)) {
                if (stream != null) {
                    log("Loaded from " + pathComponent + " "
                        + classFilename, Project.MSG_DEBUG);
                    return getClassFromStream(stream, name, pathComponent);
                }
            } catch (SecurityException se) {
                throw se;
            } catch (IOException ioe) {
                // ioe.printStackTrace();
                log("Exception reading component " + pathComponent + " (reason: "
                        + ioe.getMessage() + ")", Project.MSG_VERBOSE);
            }
        }
        throw new ClassNotFoundException(name);
    }
1201776
protected function findComponentFromStack($name, $stack)
    {
        foreach ($stack['components'] as $componentInfo) {
            if ($componentInfo['name'] == $name) {
                return $componentInfo['obj'];
            }
        }

        return null;
    }
140613
public function findComponentByName($name)
    {
        if (isset($this->page->components[$name])) {
            return $this->page->components[$name];
        }

        if (isset($this->layout->components[$name])) {
            return $this->layout->components[$name];
        }

        $partialComponent = $this->partialStack->getComponent($name);
        if ($partialComponent !== null) {
            return $partialComponent;
        }

        return null;
    }
49334
def filter_components_by_name(name, components_list, type_=T_RPM):
    """"""
    for components in components_list:
        for component in components:
            if component['type'] == type_ and component['name'] == name:
                yield component
1043088
public function getComponentByName($name)
    {
        $components = $this->getComponentRepository();
        if ($components->has($name) === false) {
            throw new RuntimeException("Component [$name] does not exists.");
        }

        return $components->get($name);
    }
22322
public List<VoltXMLElement> findChildren(String name)
    {
        List<VoltXMLElement> retval = new ArrayList<>();
        for (VoltXMLElement vxe : children) {
            if (name.equals(vxe.name)) {
                retval.add(vxe);
            }
        }
        return retval;
    }