package exm.stc.common.lang;

import java.util.Collections;
import java.util.Map;
import java.util.TreeMap;

import exm.stc.common.Logging;

/**
 * Store bindings for argv that are specified at compile time
 */
public class CompileTimeArgs {
  /** Store in sorted order as nicety */
  private static final Map<String, String> compileTimeArgs =
                                    new TreeMap<String, String>();
  
  public static void addCompileTimeArg(String key, String value) {
    String prev = compileTimeArgs.put(key, value);
    if (prev != null) {
      Logging.getSTCLogger().warn("Overwriting old value of \"" + key + "\"."
          + " Replaced \"" + prev + "\" with \"" + value + "\"");
    }
  }
  
  public static String lookup(String key) {
    return compileTimeArgs.get(key);
  }
  
  public static Map<String, String> getCompileTimeArgs() {
    return Collections.unmodifiableMap(compileTimeArgs);
  }
}

Add support to turbine for adding additional keyword arguments
Add support to turbine for adding additional keyword arguments

git-svn-id: 47705994653588c662f4ea400dfe88107361c0e2@7203 dc4e9af1-7f46-4ead-bba6-71afc04862de
