diff options
author | Googler <noreply@google.com> | 2017-03-02 16:01:13 +0000 |
---|---|---|
committer | Yue Gan <yueg@google.com> | 2017-03-03 10:35:52 +0000 |
commit | cffe73585e3c734638414af62e98ec9466a5638c (patch) | |
tree | 87dff9c478c738b566933d7db5a04cc79bb88bbb | |
parent | 7ed28beae92c1de431a8573af345058d96752f96 (diff) |
Global cleanup change.
--
PiperOrigin-RevId: 149004753
MOS_MIGRATED_REVID=149004753
3 files changed, 38 insertions, 37 deletions
diff --git a/src/main/java/com/google/devtools/build/docgen/RuleDocumentationAttribute.java b/src/main/java/com/google/devtools/build/docgen/RuleDocumentationAttribute.java index 41091afee5..b655284465 100644 --- a/src/main/java/com/google/devtools/build/docgen/RuleDocumentationAttribute.java +++ b/src/main/java/com/google/devtools/build/docgen/RuleDocumentationAttribute.java @@ -37,22 +37,25 @@ import java.util.Set; */ public class RuleDocumentationAttribute implements Comparable<RuleDocumentationAttribute> { - private static final Map<Type<?>, String> TYPE_DESC = ImmutableMap.<Type<?>, String>builder() - .put(Type.BOOLEAN, "Boolean") - .put(Type.INTEGER, "Integer") - .put(Type.INTEGER_LIST, "List of integers") - .put(Type.STRING, "String") - .put(Type.STRING_LIST, "List of strings") - .put(BuildType.TRISTATE, "Integer") - .put(BuildType.LABEL, "<a href=\"../build-ref.html#labels\">Label</a>") - .put(BuildType.LABEL_LIST, "List of <a href=\"../build-ref.html#labels\">labels</a>") - .put(BuildType.LABEL_DICT_UNARY, - "Dictionary mapping strings to <a href=\"../build-ref.html#labels\">labels</a>") - .put(BuildType.NODEP_LABEL, "<a href=\"../build-ref.html#name\">Name</a>") - .put(BuildType.NODEP_LABEL_LIST, "List of <a href=\"../build-ref.html#name\">names</a>") - .put(BuildType.OUTPUT, "<a href=\"../build-ref.html#filename\">Filename</a>") - .put(BuildType.OUTPUT_LIST, "List of <a href=\"../build-ref.html#filename\">filenames</a>") - .build(); + private static final ImmutableMap<Type<?>, String> TYPE_DESC = + ImmutableMap.<Type<?>, String>builder() + .put(Type.BOOLEAN, "Boolean") + .put(Type.INTEGER, "Integer") + .put(Type.INTEGER_LIST, "List of integers") + .put(Type.STRING, "String") + .put(Type.STRING_LIST, "List of strings") + .put(BuildType.TRISTATE, "Integer") + .put(BuildType.LABEL, "<a href=\"../build-ref.html#labels\">Label</a>") + .put(BuildType.LABEL_LIST, "List of <a href=\"../build-ref.html#labels\">labels</a>") + .put( + BuildType.LABEL_DICT_UNARY, + "Dictionary mapping strings to <a href=\"../build-ref.html#labels\">labels</a>") + .put(BuildType.NODEP_LABEL, "<a href=\"../build-ref.html#name\">Name</a>") + .put(BuildType.NODEP_LABEL_LIST, "List of <a href=\"../build-ref.html#name\">names</a>") + .put(BuildType.OUTPUT, "<a href=\"../build-ref.html#filename\">Filename</a>") + .put( + BuildType.OUTPUT_LIST, "List of <a href=\"../build-ref.html#filename\">filenames</a>") + .build(); private final Class<? extends RuleDefinition> definitionClass; private final String attributeName; diff --git a/src/main/java/com/google/devtools/build/docgen/RuleLinkExpander.java b/src/main/java/com/google/devtools/build/docgen/RuleLinkExpander.java index e521c504ac..6bbd94c459 100644 --- a/src/main/java/com/google/devtools/build/docgen/RuleLinkExpander.java +++ b/src/main/java/com/google/devtools/build/docgen/RuleLinkExpander.java @@ -18,7 +18,6 @@ import com.google.common.collect.ImmutableSet; import java.util.HashMap; import java.util.Locale; import java.util.Map; -import java.util.Set; import java.util.regex.Matcher; /** @@ -33,24 +32,24 @@ public class RuleLinkExpander { private static final String IMPLICIT_OUTPUTS_SUFFIX = "_implicit_outputs"; private static final String FUNCTIONS_PAGE = "functions"; - private static final Set<String> STATIC_PAGES = ImmutableSet.<String>of( - "common-definitions", - "make-variables", - "predefined-python-variables"); - private static final Map<String, String> FUNCTIONS = ImmutableMap.<String, String>builder() - .put("load", FUNCTIONS_PAGE) - .put("subinclude", FUNCTIONS_PAGE) - .put("PYTHON-PREPROCESSING-REQUIRED", FUNCTIONS_PAGE) - .put("package", FUNCTIONS_PAGE) - .put("package_group", FUNCTIONS_PAGE) - .put("description", FUNCTIONS_PAGE) - .put("distribs", FUNCTIONS_PAGE) - .put("licenses", FUNCTIONS_PAGE) - .put("exports_files", FUNCTIONS_PAGE) - .put("glob", FUNCTIONS_PAGE) - .put("select", FUNCTIONS_PAGE) - .put("workspace", FUNCTIONS_PAGE) - .build(); + private static final ImmutableSet<String> STATIC_PAGES = + ImmutableSet.<String>of( + "common-definitions", "make-variables", "predefined-python-variables"); + private static final ImmutableMap<String, String> FUNCTIONS = + ImmutableMap.<String, String>builder() + .put("load", FUNCTIONS_PAGE) + .put("subinclude", FUNCTIONS_PAGE) + .put("PYTHON-PREPROCESSING-REQUIRED", FUNCTIONS_PAGE) + .put("package", FUNCTIONS_PAGE) + .put("package_group", FUNCTIONS_PAGE) + .put("description", FUNCTIONS_PAGE) + .put("distribs", FUNCTIONS_PAGE) + .put("licenses", FUNCTIONS_PAGE) + .put("exports_files", FUNCTIONS_PAGE) + .put("glob", FUNCTIONS_PAGE) + .put("select", FUNCTIONS_PAGE) + .put("workspace", FUNCTIONS_PAGE) + .build(); private final String productName; private final Map<String, String> ruleIndex = new HashMap<>(); diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaImportRule.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaImportRule.java index e2929f3ad5..377db909e1 100644 --- a/src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaImportRule.java +++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/java/BazelJavaImportRule.java @@ -28,14 +28,13 @@ import com.google.devtools.build.lib.rules.java.JavaImportBaseRule; import com.google.devtools.build.lib.rules.java.JavaSemantics; import com.google.devtools.build.lib.rules.java.JavaSourceInfoProvider; -import java.util.Set; /** * Rule definition for the java_import rule. */ public final class BazelJavaImportRule implements RuleDefinition { - private static final Set<String> ALLOWED_DEPS = + private static final ImmutableSet<String> ALLOWED_DEPS = ImmutableSet.of("java_library", "java_import", "cc_library", "cc_binary"); @Override |