I see there is a new thing added up in Java7 named method handlers. For what scenario they are useful for?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
IMHO It is a tool set ahead of its time. It is intend to replace reflections but has some performance issues (it can much faster or slower, but not consistently faster) It synatx is a bit cumbersome as well.
What is coming in Java 8 is closures and first class method references. MethodHandles will play a big part in this and make their use/syntax natural and integrated. i.e. you will be able to use the new java syntax without having to refer to this class directly and the compiler will assist in the checking of types and exception throw in a way it cannot do with reflections now. I assume by the time Java 8 is release its performance issues will be resolved as well.