package com.baidu.tts.tools; import java.lang.reflect.Method; public class ReflectTool { public static Method getSupportedMethod(Class<?> cls, String str, Class<?>[] clsArr) throws NoSuchMethodException { if (cls != null) { try { return cls.getDeclaredMethod(str, clsArr); } catch (NoSuchMethodException unused) { return getSupportedMethod(cls.getSuperclass(), str, clsArr); } } else { throw new NoSuchMethodException(); } } }