Why when i try to invoke the method i get:
java.lang.IllegalArgumentException: object is not an instance of declaring class
My code:
Class<?> tWCCamRes = tCLSLoader.loadClass("com.github.sarxos.webcam.WebcamResolution");
Field tVGA = tWCCamRes.getDeclaredField("VGA");
Method tMeth = tVGA.getDeclaringClass().getDeclaredMethod("getSize");
tMeth.invoke(tVGA, (Object[]) null); // Error
In theory I pass the object instance but it failed.
Thanks in advance :)