mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
Add missing method to Properties
This commit is contained in:
parent
980a2d9e97
commit
fc4425d7f4
|
@ -331,7 +331,7 @@ public class TProperties extends THashtable<Object, Object> {
|
|||
return selected.keys();
|
||||
}
|
||||
|
||||
private void selectProperties(THashtable<Object, Object> selected) {
|
||||
private void selectProperties(TMap<Object, Object> selected) {
|
||||
if (defaults != null) {
|
||||
defaults.selectProperties(selected);
|
||||
}
|
||||
|
@ -398,4 +398,24 @@ public class TProperties extends THashtable<Object, Object> {
|
|||
}
|
||||
writer.write("\n");
|
||||
}
|
||||
|
||||
public TSet<String> stringPropertyNames() {
|
||||
TSet<String> selected = new THashSet<>();
|
||||
selectPropertyNames(selected);
|
||||
return selected;
|
||||
}
|
||||
|
||||
private void selectPropertyNames(TSet<String> selected) {
|
||||
if (defaults != null) {
|
||||
defaults.selectPropertyNames(selected);
|
||||
}
|
||||
|
||||
TEnumeration<Object> e = keys();
|
||||
while (e.hasMoreElements()) {
|
||||
Object key = e.nextElement();
|
||||
if (key instanceof String) {
|
||||
selected.add((String) key);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -67,6 +67,7 @@ public class ClasspathResourceMapper implements Mapper<String, ClassHolder>, Cla
|
|||
Map<String, Transformation> transformationMap = new HashMap<>();
|
||||
loadProperties(properties, transformationMap);
|
||||
transformations.addAll(transformationMap.values());
|
||||
renamer = new ClassRefsRenamer(new CachedMapper<>(classNameMapper));
|
||||
}
|
||||
|
||||
private void loadProperties(Properties properties, Map<String, Transformation> cache) {
|
||||
|
@ -165,6 +166,9 @@ public class ClasspathResourceMapper implements Mapper<String, ClassHolder>, Cla
|
|||
}
|
||||
|
||||
private Date getOriginalModificationDate(String className) {
|
||||
if (classLoader == null) {
|
||||
return null;
|
||||
}
|
||||
URL url = classLoader.getResource(className.replace('.', '/') + ".class");
|
||||
if (url == null) {
|
||||
return null;
|
||||
|
|
Loading…
Reference in New Issue
Block a user