However, it results in the following warning:
warning: non-varargs call of varargs method with inexact argument type for last parameter;
[javac] cast to java.lang.Object for a varargs call
[javac] cast to java.lang.Object[] for a non-varargs call and to suppress this warning
[javac] logger.debug("METHOD: " + mBean[i].getName() + " : " + mBean[i].invoke(classItself, null));
In order to prevent the error, simply modify the following line by casting null to Object []:
System.out.println("METHOD: " + m[i].getName() + " : " + m[i].invoke(classItself, (Object [])null));
Hiç yorum yok:
Yorum Gönder