从.property文件中取值: 打开declaration 或者 xxx.properties文件
将鼠标放在Configuration.getString("xx");的Configuration 或者getString上。
public ChequeDeliveryFeedManager() throws IOException{
fullChequeList=Configuration.getString("fullChequeList"); //$NON-NLS-1$
updateLog=Configuration.getString("chequeUpdateLog"); //$NON-NLS-1$
fmi = (FeedManagerInterface) new ChequeFeed();
log = new FileWriter(updateLog, true);
_format = new SimpleDateFormat(Configuration.getString("chequeDateFormat")); //$NON-NLS-1$
System.out.println("Log File: " + updateLog); //$NON-NLS-1$
}
public class Configuration {
private static final String BUNDLE_NAME = "deliveryPath"; //$NON-NLS-1$
private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
.getBundle(BUNDLE_NAME);
private Configuration() {
}
public static String getString(String key) {
try {
return RESOURCE_BUNDLE.getString(key);
} catch (MissingResourceException e) {
return '!' + key + '!';
}
}
}