?? errorfactory.java
字號:
package org.lazybug.util;
import java.util.*;
/**
* <p>Title: 監(jiān)控終端</p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2003</p>
* <p>Company: www.lazybug.com</p>
* @author 劉學(xué)
* @version 1.0
*/
public class ErrorFactory
{
private static ResourceBundle bundle = null;
private static final ResourceBundle getResourceBundle()
{
if( bundle == null )
{
bundle = ResourceBundle.getBundle("resources.error");
}
return bundle;
}
/*
* Read the information from Config table
*/
public static final String getString(String key)
{
String value = null;
try
{
value = getResourceBundle().getString(key);
}
catch (MissingResourceException e)
{}
if(value == null)
{
value = "Could not find resource: " + key + " ";
}
return value;
}
public static void main(String[] args)
{
System.out.println( org.lazybug.util.Tools.toLocal(ErrorFactory.getString("err_1")) );
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -