DEV Community

loading...
Cover image for Invoking and handling privates and all other methods of an object with and without the use of Reflection in Java

Invoking and handling privates and all other methods of an object with and without the use of Reflection in Java

bw_software profile image Burningwave ・Updated on ・1 min read

For methods handling we are going to use Methods component; Methods component uses to cache all methods and all method handles for faster access. In order to accomplish the task, we initially need to add the following dependency to our pom.xml:

Let’s take a look at the code now:

We learned how to handle methods and the complete source is available here.

Discussion (0)

pic
Editor guide