aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/moe/nea/modernjava/launch/util/ClassLoaderManipulations.java
diff options
context:
space:
mode:
authornea <nea@nea.moe>2023-11-01 18:50:11 +0100
committernea <nea@nea.moe>2023-11-01 18:50:11 +0100
commit297cb01f220a617dd08096467978b2fccbc27695 (patch)
treed467f358313ce3648063da41b66361a840fa7864 /src/main/java/moe/nea/modernjava/launch/util/ClassLoaderManipulations.java
parentd5253dc5c3ae7b2cc1fcb96780e43b929a449eb4 (diff)
downloadModernJavaLauncher-297cb01f220a617dd08096467978b2fccbc27695.tar.gz
ModernJavaLauncher-297cb01f220a617dd08096467978b2fccbc27695.tar.bz2
ModernJavaLauncher-297cb01f220a617dd08096467978b2fccbc27695.zip
Add documentation
Diffstat (limited to 'src/main/java/moe/nea/modernjava/launch/util/ClassLoaderManipulations.java')
-rw-r--r--src/main/java/moe/nea/modernjava/launch/util/ClassLoaderManipulations.java10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/main/java/moe/nea/modernjava/launch/util/ClassLoaderManipulations.java b/src/main/java/moe/nea/modernjava/launch/util/ClassLoaderManipulations.java
index 09f2368..6cc21e9 100644
--- a/src/main/java/moe/nea/modernjava/launch/util/ClassLoaderManipulations.java
+++ b/src/main/java/moe/nea/modernjava/launch/util/ClassLoaderManipulations.java
@@ -1,6 +1,7 @@
package moe.nea.modernjava.launch.util;
import net.minecraft.launchwrapper.Launch;
+import net.minecraft.launchwrapper.LaunchClassLoader;
import java.io.File;
import java.lang.reflect.Method;
@@ -8,7 +9,10 @@ import java.net.MalformedURLException;
import java.net.URL;
public class ClassLoaderManipulations {
-
+ /**
+ * Adds a File to the parent class loader of the launch class loader. Necessary if you want to/have to use
+ * {@link LaunchClassLoader#addClassLoaderExclusion(String)}.
+ */
public static void addToParentClassLoader(File file) {
try {
addToParentClassLoader(file.toURI().toURL());
@@ -17,6 +21,10 @@ public class ClassLoaderManipulations {
}
}
+ /**
+ * Adds a URL to the parent class loader of the launch class loader. Necessary if you want to/have to use
+ * {@link LaunchClassLoader#addClassLoaderExclusion(String)}.
+ */
public static void addToParentClassLoader(URL file) {
try {
Launch.classLoader.addURL(file);