mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-01-07 00:03:04 +08:00
refactor: replace protected with private for final class
This commit is contained in:
parent
7d3abb083b
commit
ca6ddfd2cc
@ -169,8 +169,8 @@ public final class ResourceLoader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("rawtypes")
|
@SuppressWarnings("rawtypes")
|
||||||
protected static void loadFromResource(
|
private static void loadFromResource(
|
||||||
Class<?> c, ResourceType type, Int2ObjectMap map, boolean doReload) throws Exception {
|
Class<?> c, ResourceType type, Int2ObjectMap map, boolean doReload) throws Exception {
|
||||||
val simpleName = c.getSimpleName();
|
val simpleName = c.getSimpleName();
|
||||||
if (doReload || !loadedResources.contains(simpleName)) {
|
if (doReload || !loadedResources.contains(simpleName)) {
|
||||||
for (String name : type.name()) {
|
for (String name : type.name()) {
|
||||||
@ -181,7 +181,7 @@ public final class ResourceLoader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||||
protected static <T> void loadFromResource(Class<T> c, Path filename, Int2ObjectMap map)
|
private static <T> void loadFromResource(Class<T> c, Path filename, Int2ObjectMap map)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
val results =
|
val results =
|
||||||
switch (FileUtils.getFileExtension(filename)) {
|
switch (FileUtils.getFileExtension(filename)) {
|
||||||
@ -200,7 +200,7 @@ public final class ResourceLoader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||||
protected static <T> void loadFromResource(Class<T> c, String fileName, Int2ObjectMap map)
|
private static <T> void loadFromResource(Class<T> c, String fileName, Int2ObjectMap map)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
JsonUtils.loadToList(getResourcePath("ExcelBinOutput/" + fileName), c)
|
JsonUtils.loadToList(getResourcePath("ExcelBinOutput/" + fileName), c)
|
||||||
.forEach(
|
.forEach(
|
||||||
|
Loading…
Reference in New Issue
Block a user