java.util.Properties
传递给我的一个实例是使用以下方法创建的:
[...]
properties = new java.util.Properties();
try {
properties.load(
AutoProperties.class.getClassLoader().getResourceAsStream(propertyFile)
);
}
[...]
我想知道如何propertyFile
从properties
实例中检索文件名(上面)?我看了一眼 API 并没有看到任何简单的方法来做到这一点。