@ -54,15 +54,14 @@
|
||||
|
||||
package org.prismlauncher.utils;
|
||||
|
||||
import org.prismlauncher.exception.ParameterNotFoundException;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.prismlauncher.exception.ParameterNotFoundException;
|
||||
|
||||
public final class Parameters {
|
||||
|
||||
private final Map<String, List<String>> map = new HashMap<>();
|
||||
|
||||
public void add(String key, String value) {
|
||||
@ -112,5 +111,4 @@ public final class Parameters {
|
||||
|
||||
return params.get(0);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -54,6 +54,8 @@
|
||||
|
||||
package org.prismlauncher.utils;
|
||||
|
||||
import org.prismlauncher.utils.logging.Log;
|
||||
|
||||
import java.applet.Applet;
|
||||
import java.io.File;
|
||||
import java.lang.invoke.MethodHandle;
|
||||
@ -62,10 +64,7 @@ import java.lang.invoke.MethodType;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Modifier;
|
||||
|
||||
import org.prismlauncher.utils.logging.Log;
|
||||
|
||||
public final class ReflectionUtils {
|
||||
|
||||
private static final MethodHandles.Lookup LOOKUP = MethodHandles.lookup();
|
||||
private static final ClassLoader LOADER = ClassLoader.getSystemClassLoader();
|
||||
|
||||
@ -146,9 +145,7 @@ public final class ReflectionUtils {
|
||||
* @throws NoSuchMethodException
|
||||
* @throws IllegalAccessException
|
||||
*/
|
||||
public static MethodHandle findMainMethod(String clazz)
|
||||
throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException {
|
||||
public static MethodHandle findMainMethod(String clazz) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException {
|
||||
return findMainMethod(LOADER.loadClass(clazz));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -55,5 +55,4 @@ public enum Level {
|
||||
this.name = name;
|
||||
this.stderr = stderr;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -43,9 +43,8 @@ import java.io.PrintStream;
|
||||
* messages.
|
||||
*/
|
||||
public final class Log {
|
||||
|
||||
// original before possibly overridden by MC
|
||||
private static final PrintStream OUT = new PrintStream(System.out), ERR = new PrintStream(System.err);
|
||||
private static final PrintStream OUT = new PrintStream(System.out), ERR = new PrintStream(System.err);
|
||||
private static final boolean DEBUG = Boolean.getBoolean("org.prismlauncher.debug");
|
||||
|
||||
public static void launcher(String message) {
|
||||
@ -100,5 +99,4 @@ public final class Log {
|
||||
else
|
||||
OUT.println(message);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user