From 54f1562b60b6839adddbfc4706c0190c8aa48995 Mon Sep 17 00:00:00 2001 From: Kristina Chodorow Date: Wed, 18 Nov 2015 14:55:41 +0000 Subject: Remove dead code from RuleSetUtils -- MOS_MIGRATED_REVID=108139365 --- .../generatedprojecttest/util/RuleSetUtils.java | 33 ++-------------------- 1 file changed, 2 insertions(+), 31 deletions(-) (limited to 'src/test/java/com/google/devtools') diff --git a/src/test/java/com/google/devtools/build/lib/generatedprojecttest/util/RuleSetUtils.java b/src/test/java/com/google/devtools/build/lib/generatedprojecttest/util/RuleSetUtils.java index a9dbbc8aa8..2bb34a9f21 100644 --- a/src/test/java/com/google/devtools/build/lib/generatedprojecttest/util/RuleSetUtils.java +++ b/src/test/java/com/google/devtools/build/lib/generatedprojecttest/util/RuleSetUtils.java @@ -30,10 +30,8 @@ import com.google.devtools.build.lib.util.Pair; import java.util.ArrayList; import java.util.Collection; -import java.util.HashSet; import java.util.Iterator; import java.util.List; -import java.util.Set; /** * Utility class for providing static predicates for rules, to help filter the rules. @@ -66,16 +64,6 @@ public class RuleSetUtils { } }; - /** - * Predicate for checking if a rule allows an empty srcs attribute. - */ - public static final Predicate EMPTY_SOURCES_ALLOWED = new Predicate() { - @Override - public boolean apply(final RuleClass input) { - return !input.getAttributeByName("srcs").isNonEmpty(); - } - }; - /** * Predicate for checking that the rule can have a deps attribute, and does not have any * other mandatory attributes besides deps. @@ -103,7 +91,7 @@ public class RuleSetUtils { */ public static class HasAttributes implements Predicate { - private static enum Operator { + private enum Operator { ANY, ALL } @@ -137,16 +125,11 @@ public class RuleSetUtils { } } - public static final Predicate hasAnyAttributes( + public static Predicate hasAnyAttributes( Collection>> attributes) { return new HasAttributes(attributes, HasAttributes.Operator.ANY); } - public static final Predicate hasAllAttributes( - Collection>> attributes) { - return new HasAttributes(attributes, HasAttributes.Operator.ALL); - } - /** * Predicate for checking if an attribute is mandatory. */ @@ -167,18 +150,6 @@ public class RuleSetUtils { } }; - /** - * Predicate for checking if all the strings in a list of strings are different. - */ - public static final Predicate> ELEMENTS_ALL_DIFFERENT = - new Predicate>() { - @Override - public boolean apply(final List input) { - Set inputAsSet = new HashSet<>(input); - return input.size() == inputAsSet.size(); - } - }; - /** * Predicate for checking if a rule class is not in excluded. */ -- cgit v1.2.3