< prev index next >

src/jdk.compiler/share/classes/com/sun/tools/javac/util/Options.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -69,11 +69,11 @@
 
     /**
      * Get the value for an option.
      */
     public String get(Option option) {
-        return values.get(option.text);
+        return values.get(option.primaryName);
     }
 
     /**
      * Get the boolean value for an option, patterned after Boolean.getBoolean,
      * essentially will return true, iff the value exists and is set to "true".

@@ -99,18 +99,18 @@
 
     /**
      * Check if the value for an option has been set.
      */
     public boolean isSet(Option option) {
-        return (values.get(option.text) != null);
+        return (values.get(option.primaryName) != null);
     }
 
     /**
      * Check if the value for a choice option has been set to a specific value.
      */
     public boolean isSet(Option option, String value) {
-        return (values.get(option.text + value) != null);
+        return (values.get(option.primaryName + value) != null);
     }
 
     /**
      * Check if the value for an undocumented option has not been set.
      */

@@ -120,26 +120,26 @@
 
     /**
      * Check if the value for an option has not been set.
      */
     public boolean isUnset(Option option) {
-        return (values.get(option.text) == null);
+        return (values.get(option.primaryName) == null);
     }
 
     /**
      * Check if the value for a choice option has not been set to a specific value.
      */
     public boolean isUnset(Option option, String value) {
-        return (values.get(option.text + value) == null);
+        return (values.get(option.primaryName + value) == null);
     }
 
     public void put(String name, String value) {
         values.put(name, value);
     }
 
     public void put(Option option, String value) {
-        values.put(option.text, value);
+        values.put(option.primaryName, value);
     }
 
     public void putAll(Options options) {
         values.putAll(options.values);
     }
< prev index next >