diff --git a/src/main/java/com/google/devtools/build/lib/runtime/AllIncompatibleChangesExpansion.java b/src/main/java/com/google/devtools/build/lib/runtime/AllIncompatibleChangesExpansion.java
index 849e18c..cf81b22 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/AllIncompatibleChangesExpansion.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/AllIncompatibleChangesExpansion.java
@@ -116,7 +116,7 @@
     if (optionDefinition.allowsMultiple()) {
       throw new IllegalArgumentException(prefix + "must not use the allowMultiple field");
     }
-    if (optionDefinition.getImplicitRequirements().length > 0) {
+    if (optionDefinition.hasImplicitRequirements()) {
       throw new IllegalArgumentException(prefix + "must not use the implicitRequirements field");
     }
     if (!optionDefinition.getOldOptionName().equals(defaultString)) {
diff --git a/src/main/java/com/google/devtools/common/options/OptionDefinition.java b/src/main/java/com/google/devtools/common/options/OptionDefinition.java
index 38ea4bc..40da044 100644
--- a/src/main/java/com/google/devtools/common/options/OptionDefinition.java
+++ b/src/main/java/com/google/devtools/common/options/OptionDefinition.java
@@ -185,6 +185,11 @@
     return (getOptionExpansion().length > 0 || usesExpansionFunction());
   }
 
+  /** Returns whether the arg is an expansion option. */
+  public boolean hasImplicitRequirements() {
+    return (getImplicitRequirements().length > 0);
+  }
+
   /**
    * Returns whether the arg is an expansion option defined by an expansion function (and not a
    * constant expansion value).
diff --git a/src/main/java/com/google/devtools/common/options/OptionValueDescription.java b/src/main/java/com/google/devtools/common/options/OptionValueDescription.java
index ca709dc..8222aee 100644
--- a/src/main/java/com/google/devtools/common/options/OptionValueDescription.java
+++ b/src/main/java/com/google/devtools/common/options/OptionValueDescription.java
@@ -69,7 +69,7 @@
       return new RepeatableOptionValueDescription(option);
     } else if (option.isExpansionOption()) {
       return new ExpansionOptionValueDescription(option);
-    } else if (option.getImplicitRequirements().length > 0) {
+    } else if (option.hasImplicitRequirements()) {
       return new OptionWithImplicitRequirementsValueDescription(option);
     } else if (option.isWrapperOption()) {
       return new WrapperOptionValueDescription(option);
@@ -331,7 +331,7 @@
 
     private OptionWithImplicitRequirementsValueDescription(OptionDefinition optionDefinition) {
       super(optionDefinition);
-      if (optionDefinition.getImplicitRequirements().length == 0) {
+      if (!optionDefinition.hasImplicitRequirements()) {
         throw new ConstructionException(
             "Options without implicit requirements can't be tracked using "
                 + "OptionWithImplicitRequirementsValueDescription");
diff --git a/src/main/java/com/google/devtools/common/options/OptionsParserImpl.java b/src/main/java/com/google/devtools/common/options/OptionsParserImpl.java
index 94568be..d3a3751 100644
--- a/src/main/java/com/google/devtools/common/options/OptionsParserImpl.java
+++ b/src/main/java/com/google/devtools/common/options/OptionsParserImpl.java
@@ -146,10 +146,10 @@
         // the other options alphabetically.
         .sorted(
             (v1, v2) -> {
-              if (v1.isImplicitRequirement()) {
-                return v2.isImplicitRequirement() ? 0 : 1;
+              if (v1.getOptionDefinition().hasImplicitRequirements()) {
+                return v2.getOptionDefinition().hasImplicitRequirements() ? 0 : 1;
               }
-              if (v2.isImplicitRequirement()) {
+              if (v2.getOptionDefinition().hasImplicitRequirements()) {
                 return -1;
               }
               return v1.getOptionDefinition()
@@ -157,7 +157,7 @@
                   .compareTo(v2.getOptionDefinition().getOptionName());
             })
         // Ignore expansion options.
-        .filter(value -> !value.isExpansion())
+        .filter(value -> !value.getOptionDefinition().isExpansionOption())
         .map(
             value ->
                 "--"
@@ -422,7 +422,7 @@
       }
 
       // Collect any implicit requirements.
-      if (optionDefinition.getImplicitRequirements().length > 0) {
+      if (optionDefinition.hasImplicitRequirements()) {
         implicitRequirements.put(
             optionDefinition, Arrays.asList(optionDefinition.getImplicitRequirements()));
       }
diff --git a/src/main/java/com/google/devtools/common/options/OptionsUsage.java b/src/main/java/com/google/devtools/common/options/OptionsUsage.java
index f481734..68a460e 100644
--- a/src/main/java/com/google/devtools/common/options/OptionsUsage.java
+++ b/src/main/java/com/google/devtools/common/options/OptionsUsage.java
@@ -146,7 +146,7 @@
       usage.append(paragraphFill(expandsMsg.toString(), /*indent=*/ 6, /*width=*/ 80));
       usage.append('\n');
     }
-    if (optionDefinition.getImplicitRequirements().length > 0) {
+    if (optionDefinition.hasImplicitRequirements()) {
       StringBuilder requiredMsg = new StringBuilder("Using this option will also add: ");
       for (String req : optionDefinition.getImplicitRequirements()) {
         requiredMsg.append(req).append(" ");
diff --git a/src/main/java/com/google/devtools/common/options/ParsedOptionDescription.java b/src/main/java/com/google/devtools/common/options/ParsedOptionDescription.java
index 1c897c3..036ac41 100644
--- a/src/main/java/com/google/devtools/common/options/ParsedOptionDescription.java
+++ b/src/main/java/com/google/devtools/common/options/ParsedOptionDescription.java
@@ -82,14 +82,6 @@
     return tags.contains(OptionMetadataTag.HIDDEN) || tags.contains(OptionMetadataTag.INTERNAL);
   }
 
-  boolean isExpansion() {
-    return optionDefinition.isExpansionOption();
-  }
-
-  boolean isImplicitRequirement() {
-    return optionDefinition.getImplicitRequirements().length > 0;
-  }
-
   public String getUnconvertedValue() {
     return unconvertedValue;
   }
@@ -128,4 +120,5 @@
     }
     return result.toString();
   }
+
 }
diff --git a/src/test/java/com/google/devtools/common/options/OptionsParserTest.java b/src/test/java/com/google/devtools/common/options/OptionsParserTest.java
index 370bb33..e71307b 100644
--- a/src/test/java/com/google/devtools/common/options/OptionsParserTest.java
+++ b/src/test/java/com/google/devtools/common/options/OptionsParserTest.java
@@ -1198,7 +1198,7 @@
     SingleOptionValueDescription singleOptionResult = (SingleOptionValueDescription) result;
     ParsedOptionDescription singleOptionInstance = singleOptionResult.getEffectiveOptionInstance();
     assertThat(singleOptionInstance.getPriority()).isEqualTo(OptionPriority.COMMAND_LINE);
-    assertThat(singleOptionInstance.isExpansion()).isFalse();
+    assertThat(singleOptionInstance.getOptionDefinition().isExpansionOption()).isFalse();
   }
 
   public static class ImplicitDependencyWarningOptions extends OptionsBase {
