diff options
author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2018-05-25 12:16:57 +1000 |
---|---|---|
committer | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2018-05-25 12:16:57 +1000 |
commit | 2b73e75c4de865c05c5cb48bc9e91b1754a37c0c (patch) | |
tree | 99bb61b1857500a3d313417fd948acc7ce4cedd4 /src/Java/gtPlusPlus/core/util | |
parent | 83a72ed129bafdf25ab87e45521a1a22a3afc23e (diff) | |
download | GT5-Unofficial-2b73e75c4de865c05c5cb48bc9e91b1754a37c0c.tar.gz GT5-Unofficial-2b73e75c4de865c05c5cb48bc9e91b1754a37c0c.tar.bz2 GT5-Unofficial-2b73e75c4de865c05c5cb48bc9e91b1754a37c0c.zip |
+ Added a WeakRef type Automap.
+ Added getClassByName(String) to ReflectionUtils.java.
+ Added lots of handlers to ThaumcraftUtils.java.
$ Improved Fake Player handling to only now be held by weak references. Should prevent worlds staying loaded.
Diffstat (limited to 'src/Java/gtPlusPlus/core/util')
-rw-r--r-- | src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java b/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java index 882d16c232..d8afcf7e00 100644 --- a/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java +++ b/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java @@ -323,5 +323,17 @@ public class ReflectionUtils { return null; } + public static Class<?> getClassByName(String string) { + if (ReflectionUtils.doesClassExist(string)) { + try { + return Class.forName(string); + } + catch (ClassNotFoundException e) { + return getNonPublicClass(string); + } + } + return null; + } + } |