2 * Decompiled with CFR 0.151.
4 * Could not load the following classes:
5 * org.gotti.wurmunlimited.modloader.ReflectionUtil
7 package net
.encode
.wurmesp
.util
;
9 import java
.lang
.reflect
.Field
;
10 import java
.util
.logging
.Level
;
11 import java
.util
.logging
.Logger
;
12 import net
.encode
.wurmesp
.feature
.hook
.Hook
;
13 import org
.gotti
.wurmunlimited
.modloader
.ReflectionUtil
;
15 public class ReUtils
{
16 @SuppressWarnings("unchecked")
17 public static <T
> T
getField(Object proxy
, String fieldname
) {
18 Class
<?
> cls
= proxy
.getClass();
19 Object returnedObject
= null;
21 Field field
= ReflectionUtil
.getField(cls
, (String
)fieldname
);
22 returnedObject
= ReflectionUtil
.getPrivateField((Object
)proxy
, (Field
)field
);
24 catch (ClassCastException
| IllegalAccessException
| IllegalArgumentException
| NoSuchFieldException ex
) {
25 Logger
.getLogger(Hook
.class.getName()).log(Level
.SEVERE
, null, ex
);
27 return (T
)returnedObject
;