diff options
author | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-08-12 20:48:13 +0100 |
---|---|---|
committer | Alkalus <3060479+draknyte1@users.noreply.github.com> | 2019-08-12 20:48:13 +0100 |
commit | 800119d6a1e75ffd0201a9dfc44c53a7604a9f37 (patch) | |
tree | cf24750911b3325dba459dc76f19684c15fb535d /src/Java/gtPlusPlus/core/util/reflect | |
parent | 36cae46b02a783e2ef4887b614934b4df72bcf5a (diff) | |
download | GT5-Unofficial-800119d6a1e75ffd0201a9dfc44c53a7604a9f37.tar.gz GT5-Unofficial-800119d6a1e75ffd0201a9dfc44c53a7604a9f37.tar.bz2 GT5-Unofficial-800119d6a1e75ffd0201a9dfc44c53a7604a9f37.zip |
+ Added Reliquary support.
$ Fixed #527.
$ Fixed Sugar Coke Recipe.
Diffstat (limited to 'src/Java/gtPlusPlus/core/util/reflect')
-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 efc86122e2..19e42735d7 100644 --- a/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java +++ b/src/Java/gtPlusPlus/core/util/reflect/ReflectionUtils.java @@ -813,5 +813,17 @@ public class ReflectionUtils { return false; } + public static Object getFieldValue(Field field) { + return getFieldValue(field, null); + } + + public static Object getFieldValue(Field field, Object instance) { + try { + return field.get(instance); + } catch (IllegalArgumentException | IllegalAccessException e) { + } + return null; + } + } |