Shrink down getSetting() size in configurations
This commit is contained in:
parent
e695235277
commit
90b6dbcd31
2 changed files with 19 additions and 51 deletions
|
@ -366,48 +366,22 @@ public final class EngineConfiguration implements SubsystemConfiguration {
|
||||||
@Nullable
|
@Nullable
|
||||||
public Object getSetting(@NotNull String setting) {
|
public Object getSetting(@NotNull String setting) {
|
||||||
switch (setting) {
|
switch (setting) {
|
||||||
case "debug" -> {
|
case "debug" -> { return debug; }
|
||||||
return debug;
|
case "debugEvents" -> { return debugEvents; }
|
||||||
}
|
case "debugShortcodeConverter" -> { return debugShortcodeConverter; }
|
||||||
case "debugEvents" -> {
|
|
||||||
return debugEvents;
|
|
||||||
}
|
|
||||||
case "debugShortcodeConverter" -> {
|
|
||||||
return debugShortcodeConverter;
|
|
||||||
}
|
|
||||||
|
|
||||||
case "errorShortcodeConverter" -> {
|
case "errorShortcodeConverter" -> { return errorShortcodeConverter; }
|
||||||
return errorShortcodeConverter;
|
|
||||||
}
|
|
||||||
|
|
||||||
case "loggerLevel" -> {
|
case "loggerLevel" -> { return loggerLevel; }
|
||||||
return loggerLevel;
|
case "loggerTemplate" -> { return loggerTemplate; }
|
||||||
}
|
case "loggerImmediateShutdown" -> { return loggerImmediateShutdown; }
|
||||||
case "loggerTemplate" -> {
|
case "loggerForceStandardOutput" -> { return loggerForceStandardOutput; }
|
||||||
return loggerTemplate;
|
case "loggerPollingSpeed" -> { return loggerPollingSpeed; }
|
||||||
}
|
|
||||||
case "loggerImmediateShutdown" -> {
|
|
||||||
return loggerImmediateShutdown;
|
|
||||||
}
|
|
||||||
case "loggerForceStandardOutput" -> {
|
|
||||||
return loggerForceStandardOutput;
|
|
||||||
}
|
|
||||||
case "loggerPollingSpeed" -> {
|
|
||||||
return loggerPollingSpeed;
|
|
||||||
}
|
|
||||||
|
|
||||||
case "optimizeLogging" -> {
|
case "optimizeLogging" -> { return optimizeLogging; }
|
||||||
return optimizeLogging;
|
case "optimizeEvents" -> { return optimizeEvents; }
|
||||||
}
|
case "optimizeSubsystemInitialization" -> { return optimizeSubsystemInitialization; }
|
||||||
case "optimizeEvents" -> {
|
default -> { return null; }
|
||||||
return optimizeEvents;
|
|
||||||
}
|
|
||||||
case "optimizeSubsystemInitialization" -> {
|
|
||||||
return optimizeSubsystemInitialization;
|
|
||||||
}
|
|
||||||
default -> {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -190,18 +190,12 @@ public final class GraphicsSubsystemConfiguration implements SubsystemConfigurat
|
||||||
@Nullable
|
@Nullable
|
||||||
public Object getSetting(@NotNull String setting) {
|
public Object getSetting(@NotNull String setting) {
|
||||||
switch (setting) {
|
switch (setting) {
|
||||||
case "debug" -> {
|
case "debug" -> { return debug; }
|
||||||
return debug;
|
|
||||||
}
|
case "errorGraphicsError" -> { return errorGraphicsError; }
|
||||||
case "errorGraphicsError" -> {
|
|
||||||
return errorGraphicsError;
|
case "disallowTearing" -> { return disallowTearing; }
|
||||||
}
|
default -> { return null; }
|
||||||
case "disallowTearing" -> {
|
|
||||||
return disallowTearing;
|
|
||||||
}
|
|
||||||
default -> {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue