1 package org.unicode.cldr.tool; 2 3 import org.unicode.cldr.util.CLDRConfig; 4 import org.unicode.cldr.util.CLDRConfig.Environment; 5 6 /** 7 * Shim for CLDRConfig. It shouldn't be called outside of tool (command line) usage. 8 * 9 * Formerly: unittest.TestAll.TestInfo 10 * 11 */ 12 public class ToolConfig { 13 14 private static CLDRConfig INSTANCE = null; 15 getToolInstance()16 public static final synchronized CLDRConfig getToolInstance() { 17 if (INSTANCE == null) { 18 INSTANCE = CLDRConfig.getInstance(); 19 if (INSTANCE.getEnvironment() != Environment.LOCAL) { // verify we aren't in the server, unittests, etc. 20 throw new InternalError("Error: ToolConfig can only be used in the LOCAL environment."); 21 } 22 } 23 return INSTANCE; 24 } 25 }