NoSuchMethodException tho the method is public and spelled correctly, why?
I'm trying to copy an instance of a class using reflection.
In my class Poly I try to find a method for each inaccesible field in the class.
For example, I have a variable:
but its default, so to access it i added get and set methods:
getOuterRadius() and setOuterRadius(float value)
My program tries to find the get method like this:
Poly.getClass().getDeclaredMethod("getOuterRadius" , null);
but then it throws NoSuchMethodException and I have no idea why!
The method is public and all so it shouldn't be a problem.
Using getMethod(... Does not work either.
So what is this problem all about?
Re: NoSuchMethodException tho the method is public and spelled correctly, why?
Nvm, found out its suppose to get an array of classes rather than just one class in the getdecleard method thing