Convenience method to reuse the super constructor.
@param components
@return a non-null collection
12342
static Collection<AbstractType> asList( Collection<Component> components ) {

		Collection<AbstractType> result = new ArrayList<AbstractType> ();
		result.addAll( components );

		return result;
	}
609315
private List<String> getImportComponents( Component component ) {

		List<String> result = new ArrayList<> ();
		Map<String,Boolean> map = ComponentHelpers.findComponentDependenciesFor( component );
		for( Map.Entry<String,Boolean> entry : map.entrySet()) {
			String s = applyLink( entry.getKey(), entry.getKey());
			s += entry.getValue() ? this.messages.get( "optional" ) : this.messages.get( "required" ); //$NON-NLS-1$ //$NON-NLS-2$
			result.add( s );
		}

		return result;
	}
1317408
public Set<Constructor> getConstructorsWithAnyParamAnnotated(Class<? extends Annotation> annotation) {
        return getConstructorsFromDescriptors(store.get(index(MethodParameterScanner.class), annotation.getName()), loaders());
    }
1233020
@Nullable
  private static Type subtypeOfComponentType(Type[] bounds) {
    for (Type bound : bounds) {
      Type componentType = getComponentType(bound);
      if (componentType != null) {
        // Only the first bound can be a class or array.
        // Bounds after the first can only be interfaces.
        if (componentType instanceof Class) {
          Class<?> componentClass = (Class<?>) componentType;
          if (componentClass.isPrimitive()) {
            return componentClass;
          }
        }
        return subtypeOf(componentType);
      }
    }
    return null;
  }
759461
public static List<Class<?>> getAllSuperclasses(final Class<?> cls) {
        if (cls == null) {
            return null;
        }
        final List<Class<?>> classes = new ArrayList<>();
        Class<?> superclass = cls.getSuperclass();
        while (superclass != null) {
            classes.add(superclass);
            superclass = superclass.getSuperclass();
        }
        return classes;
    }
835674
private static Constructor<?> getPersistenceStoreConstructor(Class<?> theClass, Class<?>[] interfaces) throws Exception {
        Constructor<?> constructor = null;
        for (Class<?> interfaceClass : interfaces) {
            try {
                constructor = theClass.getConstructor(new Class[] { interfaceClass });
            } catch (NoSuchMethodException err) {
                // Ignore this error
            }
            if (constructor != null) {
                break;
            }
            constructor = getPersistenceStoreConstructor(theClass, interfaceClass.getInterfaces());
            if (constructor != null) {
                break;
            }
        }
        return constructor;
    }
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;
    }
1280415
public static Constructor<?>[] constructorsDeclaredIn(final Class<?> cls, final Class<?>... additionalClasses) {
        if (cls == null) {
            throw new IllegalArgumentException("You need to supply at least one class.");
        }
        Set<Constructor<?>> constructors = new HashSet<Constructor<?>>();
        constructors.addAll(asList(WhiteboxImpl.getAllConstructors(cls)));
        for (Class<?> klass : additionalClasses) {
            constructors.addAll(asList(WhiteboxImpl.getAllConstructors(klass)));
        }
        return constructors.toArray(new Constructor[constructors.size()]);
    }
498671
public static <E> ImmutableList<E> copyOf(E[] elements) {
    switch (elements.length) {
      case 0:
        return ImmutableList.of();
      case 1:
        return new SingletonImmutableList<E>(elements[0]);
      default:
        return new RegularImmutableList<E>(checkElementsNotNull(elements.clone()));
    }
  }
1260315
public List<ICalComponent> getComponents(T component) {
		return new ArrayList<ICalComponent>(component.getComponents().values());
	}
541334
public EntityMakerBuilder reuseEntities(Collection<Object> entities) {
        for (Object entity : entities) {
            Class aClass = entity.getClass();
            valueHolder.putIfNotNull(aClass, entity);
        }
        return this;
    }
170665
@Beta
    @SafeVarargs
    public static <T> Predicate<T> nand(Predicate<? super T>... components) {
        return com.google.common.base.Predicates.not(com.google.common.base.Predicates.and(components));
    }
432458
public static <T> Level0IndefiniteArrayOperator<T[],T> onArrayFor(final T... elements) {
        return new Level0IndefiniteArrayOperator<T[],T>(ExecutionTarget.forOp(VarArgsUtil.asRequiredObjectArray(elements), Normalisation.NONE));
    }
933419
@SuppressWarnings("unchecked")
	<T extends Component> T getComponent (ComponentType componentType) {
		int componentTypeIndex = componentType.getIndex();

		if (componentTypeIndex < components.getCapacity()) {
			return (T)components.get(componentType.getIndex());
		} else {
			return null;
		}
	}
427459
private static void buildComponents(ExecutionContext context) throws ClassNotFoundException, NoSuchMethodException,
            IllegalAccessException, InvocationTargetException, InstantiationException {
        Collection<BeanDef> cDefs = context.getTopologyDef().getComponents();
        if (cDefs != null) {
            for (BeanDef bean : cDefs) {
                Object obj = buildObject(bean, context);
                context.addComponent(bean.getId(), obj);
            }
        }
    }
18937
public static Set<ExecutableElement>
            constructorsIn(Set<? extends Element> elements) {
        return setFilter(elements, CONSTRUCTOR_KIND, ExecutableElement.class);
    }
276720
public static List<InputComponent> addInputComponents(UIBuilder builder, InputComponent... components) {
        List<InputComponent> inputComponents = new ArrayList<>();
        for (InputComponent component : components) {
            builder.add(component);
            inputComponents.add(component);
        }
        return inputComponents;
    }