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 * <p>Formerly: unittest.TestAll.TestInfo 10 */ 11 public class ToolConfig { 12 13 private static CLDRConfig INSTANCE = null; 14 getToolInstance()15 public static final synchronized CLDRConfig getToolInstance() { 16 if (INSTANCE == null) { 17 INSTANCE = CLDRConfig.getInstance(); 18 if (INSTANCE.getEnvironment() 19 != Environment.LOCAL) { // verify we aren't in the server, unittests, etc. 20 throw new InternalError( 21 "Error: ToolConfig can only be used in the LOCAL environment."); 22 } 23 } 24 return INSTANCE; 25 } 26 } 27