package com.example.imlinkclient.utils;

import java.lang.reflect.Field;

public class InvokeUtil{
    public static <T>  T getDeclaredField(Class cls, String fieldName, Object object) {
        try {
            Field field = cls.getDeclaredField(fieldName);
            T o = (T) field.get(object);
            return o;
        } catch (NoSuchFieldException | IllegalAccessException e) {
            e.printStackTrace();
        }
        return null;
    }
}
