aboutsummaryrefslogtreecommitdiff
path: root/libraries/launcher/org/prismlauncher/utils/ReflectionUtils.java
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/launcher/org/prismlauncher/utils/ReflectionUtils.java')
-rw-r--r--libraries/launcher/org/prismlauncher/utils/ReflectionUtils.java17
1 files changed, 8 insertions, 9 deletions
diff --git a/libraries/launcher/org/prismlauncher/utils/ReflectionUtils.java b/libraries/launcher/org/prismlauncher/utils/ReflectionUtils.java
index 6e882387..99df70c3 100644
--- a/libraries/launcher/org/prismlauncher/utils/ReflectionUtils.java
+++ b/libraries/launcher/org/prismlauncher/utils/ReflectionUtils.java
@@ -52,7 +52,8 @@ public final class ReflectionUtils {
private static final Logger LOGGER = Logger.getLogger("ReflectionUtils");
- private ReflectionUtils() {}
+ private ReflectionUtils() {
+ }
/**
* Instantiate an applet class by name
@@ -67,8 +68,7 @@ public final class ReflectionUtils {
* method handles
* @throws Throwable any exceptions from the class's constructor
*/
- public static Applet createAppletClass(String appletClassName) throws Throwable
- {
+ public static Applet createAppletClass(String appletClassName) throws Throwable {
Class<?> appletClass = ClassLoader.getSystemClassLoader().loadClass(appletClassName);
MethodHandle appletConstructor = MethodHandles.lookup().findConstructor(appletClass,
@@ -83,8 +83,7 @@ public final class ReflectionUtils {
*
* @return The found field.
*/
- public static Field getMinecraftGameDirField(Class<?> minecraftMainClass)
- {
+ public static Field getMinecraftGameDirField(Class<?> minecraftMainClass) {
LOGGER.fine("Resolving minecraft game directory field");
// Field we're looking for is always
// private static File obfuscatedName = null;
@@ -141,8 +140,7 @@ public final class ReflectionUtils {
* @throws IllegalAccessException If method handles cannot access the entrypoint
*/
public static MethodHandle findMainEntrypoint(Class<?> entrypointClass)
- throws NoSuchMethodException, IllegalAccessException
- {
+ throws NoSuchMethodException, IllegalAccessException {
return MethodHandles.lookup().findStatic(entrypointClass, "main",
MethodType.methodType(void.class, String[].class));
}
@@ -168,7 +166,8 @@ public final class ReflectionUtils {
* @throws IllegalAccessException If method handles cannot access the entrypoint
*/
public static MethodHandle findMainMethod(String entrypointClassName)
- throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException
- { return findMainEntrypoint(ClassLoader.getSystemClassLoader().loadClass(entrypointClassName)); }
+ throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException {
+ return findMainEntrypoint(ClassLoader.getSystemClassLoader().loadClass(entrypointClassName));
+ }
}