langtools/src/share/classes/com/sun/tools/javac/util/Options.java
changeset 22163 3651128c74eb
parent 11314 b612aaca08d0
equal deleted inserted replaced
22162:3b3e23e67329 22163:3651128c74eb
    40  */
    40  */
    41 public class Options {
    41 public class Options {
    42     private static final long serialVersionUID = 0;
    42     private static final long serialVersionUID = 0;
    43 
    43 
    44     /** The context key for the options. */
    44     /** The context key for the options. */
    45     public static final Context.Key<Options> optionsKey =
    45     public static final Context.Key<Options> optionsKey = new Context.Key<>();
    46         new Context.Key<Options>();
       
    47 
    46 
    48     private LinkedHashMap<String,String> values;
    47     private LinkedHashMap<String,String> values;
    49 
    48 
    50     /** Get the Options instance for this context. */
    49     /** Get the Options instance for this context. */
    51     public static Options instance(Context context) {
    50     public static Options instance(Context context) {
    55         return instance;
    54         return instance;
    56     }
    55     }
    57 
    56 
    58     protected Options(Context context) {
    57     protected Options(Context context) {
    59 // DEBUGGING -- Use LinkedHashMap for reproducability
    58 // DEBUGGING -- Use LinkedHashMap for reproducability
    60         values = new LinkedHashMap<String,String>();
    59         values = new LinkedHashMap<>();
    61         context.put(optionsKey, this);
    60         context.put(optionsKey, this);
    62     }
    61     }
    63 
    62 
    64     /**
    63     /**
    65      * Get the value for an undocumented option.
    64      * Get the value for an undocumented option.