aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools
diff options
context:
space:
mode:
authorGravatar Kristina Chodorow <kchodorow@google.com>2015-11-18 14:55:41 +0000
committerGravatar Lukacs Berki <lberki@google.com>2015-11-18 15:32:50 +0000
commit54f1562b60b6839adddbfc4706c0190c8aa48995 (patch)
treefce758fb7aeb6d06f6ae9cd3fc0c42b19509a746 /src/test/java/com/google/devtools
parent4d035ddd28cd4c31506bae26d9877d5012c31495 (diff)
Remove dead code from RuleSetUtils
-- MOS_MIGRATED_REVID=108139365
Diffstat (limited to 'src/test/java/com/google/devtools')
-rw-r--r--src/test/java/com/google/devtools/build/lib/generatedprojecttest/util/RuleSetUtils.java33
1 files changed, 2 insertions, 31 deletions
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.
@@ -67,16 +65,6 @@ public class RuleSetUtils {
};
/**
- * Predicate for checking if a rule allows an empty srcs attribute.
- */
- public static final Predicate<RuleClass> EMPTY_SOURCES_ALLOWED = new Predicate<RuleClass>() {
- @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<RuleClass> {
- private static enum Operator {
+ private enum Operator {
ANY, ALL
}
@@ -137,16 +125,11 @@ public class RuleSetUtils {
}
}
- public static final Predicate<RuleClass> hasAnyAttributes(
+ public static Predicate<RuleClass> hasAnyAttributes(
Collection<Pair<String, Type<?>>> attributes) {
return new HasAttributes(attributes, HasAttributes.Operator.ANY);
}
- public static final Predicate<RuleClass> hasAllAttributes(
- Collection<Pair<String, Type<?>>> attributes) {
- return new HasAttributes(attributes, HasAttributes.Operator.ALL);
- }
-
/**
* Predicate for checking if an attribute is mandatory.
*/
@@ -168,18 +151,6 @@ public class RuleSetUtils {
};
/**
- * Predicate for checking if all the strings in a list of strings are different.
- */
- public static final Predicate<List<String>> ELEMENTS_ALL_DIFFERENT =
- new Predicate<List<String>>() {
- @Override
- public boolean apply(final List<String> input) {
- Set<String> inputAsSet = new HashSet<>(input);
- return input.size() == inputAsSet.size();
- }
- };
-
- /**
* Predicate for checking if a rule class is not in excluded.
*/
public static Predicate<String> notContainsAnyOf(final ImmutableSet<String> excluded) {