class BindingConditions {

    public static <T> BindingCondition<T> or(final BindingCondition<T>... conditions) {
        return new BindingCondition<T>() {
            
            @Override
            public boolean fulfilled(ClassInjector injector, Class<T> type, Map<String, Class<? extends T>[]> inheritanceTree, Annotation qualifier,
                    ClassLoader classLoader) {
                if (conditions != null && conditions.length > 1) {
                    for (BindingCondition<T> condition : conditions) {
                        if (condition.fulfilled(injector, type, inheritanceTree, qualifier, classLoader)) {
                            return true;
                        }
                    }
                    return false;
                } else if (conditions.length > 0) {
                    return conditions[0].fulfilled(injector, type, inheritanceTree, qualifier, classLoader);
                }
                return true;
            }
            
        };
    }

}