Java Reflection - Attributes

  • + 0 comments

    Right now, you are casting your method to a String when a method isn't really a String. If you check out the documentation, http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/Method.html, you can see that a function called "getName()" can be called on an instance of Method and it returns a string with the name of the method. That's what we want.