Returns a list of matching modules for the given component.<p>

@param component the component to get the modules for

@return a list of matching module names
490831
private List<String> getComponentModules(CmsSetupComponent component) {

        List<String> modules = new ArrayList<String>();
        Iterator<String> itModules = m_availableModules.keySet().iterator();
        while (itModules.hasNext()) {
            String moduleName = itModules.next();
            if (component.match(moduleName)) {
                modules.add(moduleName);
            }
        }
        return modules;
    }
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;
	}
1005531
protected void addComponentsFromPath(String fileName) throws CmsConfigurationException {

        CmsParameterConfiguration configuration;
        try {
            configuration = getComponentsProperties(fileName);
        } catch (FileNotFoundException e) {
            if (LOG.isDebugEnabled()) {
                LOG.debug(e.getLocalizedMessage(), e);
            }
            return;
        }

        for (String componentId : configuration.getList(PROPKEY_COMPONENTS)) {
            CmsSetupComponent componentBean = new CmsSetupComponent();
            componentBean.setId(componentId);
            componentBean.setName(configuration.get(PROPKEY_COMPONENT + componentId + PROPKEY_NAME));
            componentBean.setDescription(configuration.get(PROPKEY_COMPONENT + componentId + PROPKEY_DESCRIPTION));
            componentBean.setModulesRegex(configuration.get(PROPKEY_COMPONENT + componentId + PROPKEY_MODULES));
            componentBean.setDependencies(
                configuration.getList(PROPKEY_COMPONENT + componentId + PROPKEY_DEPENDENCIES));
            componentBean.setPosition(
                configuration.getInteger(PROPKEY_COMPONENT + componentId + PROPKEY_POSITION, DEFAULT_POSITION));
            componentBean.setChecked(
                configuration.getBoolean(PROPKEY_COMPONENT + componentId + PROPKEY_CHECKED, false));
            m_components.addIdentifiableObject(componentBean.getId(), componentBean, componentBean.getPosition());
        }
    }
1053653
<T extends Component> List<T> getFormRowChildren(AbstractComponentContainer container, final Class<T> cls) {

        final List<T> result = Lists.newArrayList();
        CmsVaadinUtils.visitDescendants(container, new Predicate<Component>() {

            public boolean apply(Component comp) {

                if (cls.isAssignableFrom(comp.getClass())) {
                    result.add(cls.cast(comp));
                }
                return true;
            }
        });
        return result;
    }
482868
public Map<String, SubsystemInformation> getAvailableSubsystems(String moduleName) {
        Map<String, SubsystemInformation> result = null;
        final ExtensionInfo info = extensions.get(moduleName);
        if (info != null) {
            //noinspection SynchronizationOnLocalVariableOrMethodParameter
            synchronized (info) {
                result = Collections.unmodifiableMap(new HashMap<String, SubsystemInformation>(info.subsystems));
            }
        }
        return result;
    }
113102
public Component getComponent(int componentIndex)
    {
        if (componentList != null)
            if (componentIndex < componentList.length)
                return componentList[componentIndex];
        return null;
    }
1295958
function(component) {
		
		var cid,
			foundCmp;

		if (typeof component === 'object') {
			cid = component.id();
		}
		
		foundCmp = false;
		$.each(jsCow.componentsObjectList, function(i, c) {
			if (c.id() === component) {
				foundCmp = c;
			}
		});
		
		return foundCmp;
	}
62555
public <T> List<T> getComponentInstancesOfType(Class<T> componentType)
   {
      return container.getComponentInstancesOfType(componentType);
   }
798120
public static List<Artifact> getAllArtifacts(final Module module){
        final List<Artifact> artifacts = new ArrayList<Artifact>();

        for(final Module subModule: module.getSubmodules()){
            artifacts.addAll(getAllArtifacts(subModule));
        }

        artifacts.addAll(module.getArtifacts());

        return artifacts;
    }
258922
public List<String> getAllModuleNames() {

        List<String> sortedModuleNames = new ArrayList<String>(OpenCms.getModuleManager().getModuleNames());
        java.util.Collections.sort(sortedModuleNames);
        return sortedModuleNames;
    }
1339536
public List<ICalComponent> setComponent(ICalComponent component) {
		return components.replace(component.getClass(), component);
	}
1221303
public List<Integer> getComponents (ComponentClass cclass)
    {
        List<Integer> list = _components.get(cclass);
        if (list == null) {
            list = Lists.newArrayList();
        }
        return list;
    }
361588
public <T extends ICalComponent> List<T> getComponents(Class<T> clazz) {
		return new ICalComponentList<T>(clazz);
	}
410391
public List<Duplet<String, ArrayList<WComponent>>> getTerms() {
		Map<String, Duplet<String, ArrayList<WComponent>>> componentsByTerm = new HashMap<>();
		List<Duplet<String, ArrayList<WComponent>>> result = new ArrayList<>();

		List<WComponent> childList = content.getComponentModel().getChildren();

		if (childList != null) {
			for (int i = 0; i < childList.size(); i++) {
				WComponent child = childList.get(i);
				String term = child.getTag();

				Duplet<String, ArrayList<WComponent>> termComponents = componentsByTerm.get(term);

				if (termComponents == null) {
					termComponents = new Duplet<>(term,
							new ArrayList<WComponent>());
					componentsByTerm.put(term, termComponents);
					result.add(termComponents);
				}

				termComponents.getSecond().add(child);
			}
		}

		return result;
	}
873958
public String getLabel(JComponent component) {
        String label = component2LabelMap.get(component);
        if (label != null) {
            return label;
        } else {
            return "";
        }
    }
778083
public Map<String, Object> getModuleFieldsFilters() {
        final Map<String, Object> params = new HashMap<String, Object>();

        for(final Filter filter: filters){
            params.putAll(filter.moduleFilterFields());
        }

        return params;
    }
229239
public static List<Object> asList(final Object object, final Class<?> componentType) {
        ArgUtils.notNull(componentType, "componentType");

        if(object == null) {
            return new ArrayList<>();
        }

        if(!object.getClass().isArray()) {
            throw new IllegalArgumentException(String.format("args0 is not arrays : %s.", object.getClass().getName()));
        }

        if(!componentType.isPrimitive()) {
            return Arrays.asList((Object[])object);
        }

        if(componentType.equals(boolean.class)) {
            boolean[] array = (boolean[])object;
            List<Object> list = new ArrayList<>(array.length);
            for(boolean v : array) {
                list.add(v);
            }
            return list;

        } else if(componentType.equals(char.class)) {
            char[] array = (char[])object;
            List<Object> list = new ArrayList<>(array.length);
            for(char v : array) {
                list.add(v);
            }
            return list;

        } else if(componentType.equals(byte.class)) {
            byte[] array = (byte[])object;
            List<Object> list = new ArrayList<>(array.length);
            for(byte v : array) {
                list.add(v);
            }
            return list;

        } else if(componentType.equals(short.class)) {
            short[] array = (short[])object;
            List<Object> list = new ArrayList<>(array.length);
            for(short v : array) {
                list.add(v);
            }
            return list;

        } else if(componentType.equals(int.class)) {
            int[] array = (int[])object;
            List<Object> list = new ArrayList<>(array.length);
            for(int v : array) {
                list.add(v);
            }
            return list;

        } else if(componentType.equals(long.class)) {
            long[] array = (long[])object;
            List<Object> list = new ArrayList<>(array.length);
            for(long v : array) {
                list.add(v);
            }
            return list;

        } else if(componentType.equals(float.class)) {
            float[] array = (float[])object;
            List<Object> list = new ArrayList<>(array.length);
            for(float v : array) {
                list.add(v);
            }
            return list;

        } else if(componentType.equals(double.class)) {
            double[] array = (double[])object;
            List<Object> list = new ArrayList<>(array.length);
            for(double v : array) {
                list.add(v);
            }
            return list;

        }

        throw new IllegalArgumentException(String.format("not support primitive type : %s.", componentType.getName()));

    }