Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #33531

Re: methodhandles lookup

Newsgroups comp.lang.java.programmer
Date 2016-01-24 01:59 -0800
References <1abadfac-e34b-4ff0-8ba5-613355fa928b@googlegroups.com> <n7t26f$29m$2@dont-email.me> <0bf0e18b-b787-4ce2-b0cc-f1706d786127@googlegroups.com> <n7t4l7$29m$3@dont-email.me> <n7t5qd$29m$4@dont-email.me>
Message-ID <6e5162a4-6185-45ca-995b-e7f2eda01177@googlegroups.com> (permalink)
Subject Re: methodhandles lookup
From Philipp Kraus <philipp.kraus.flashpixx@gmail.com>

Show all headers | View raw


Am Freitag, 22. Januar 2016 13:06:22 UTC+1 schrieb Jeff Higgins:
> On Fri, 22 Jan 2016 11:43:35 +0000, Jeff Higgins wrote:
> 
> > On Fri, 22 Jan 2016 03:13:31 -0800, Philipp Kraus wrote:
> > 
> >> Okay thanks.
> >> 
> >> In my system I have got a component which creates the MethodHandle
> >> objects from the Method object, so can I create based on the Method
> >> object the handle object on its signature?
> > 
> > If you can obtain the correct Class<?> from Method you might use one of
> > the MethodType.methodType(Class<?>, ...) methods. Not sure how fuzzy
> > this might get when considering such things as bridge or synthetic
> > methods.
> > 
> >> Can you explain how? 
> 
> I still think you might be able to leverage some ideas from
> <http://wiki.eclipse.org/GEF/GEF4/Common#Adapt>.
> Or more generically from the Adapter Pattern.
> 
> >> In my case I will cache all Method objects and
> >> build the handlers during runtime, is this fast enough?
> > 
> > Fast enough for what?
> > Not fair answering a question with a question?
> > Ok then, try it.

Thanks Jeff, I think you're right with the adapt pattern. I need to redesign my code so that I can
add the signature to get the correct method from the class.

Thanks that helps

Phil

Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

methodhandles lookup Philipp Kraus <philipp.kraus.flashpixx@gmail.com> - 2016-01-22 00:19 -0800
  Re: methodhandles lookup Jeff Higgins <jeff@invalid.invalid> - 2016-01-22 08:57 +0000
  Re: methodhandles lookup Jeff Higgins <jeff@invalid.invalid> - 2016-01-22 11:01 +0000
    Re: methodhandles lookup Philipp Kraus <philipp.kraus.flashpixx@gmail.com> - 2016-01-22 03:13 -0800
      Re: methodhandles lookup Jeff Higgins <jeff@invalid.invalid> - 2016-01-22 11:43 +0000
        Re: methodhandles lookup Jeff Higgins <jeff@invalid.invalid> - 2016-01-22 12:03 +0000
          Re: methodhandles lookup Philipp Kraus <philipp.kraus.flashpixx@gmail.com> - 2016-01-24 01:59 -0800
      Re: methodhandles lookup Jeff Higgins <jeff@invalid.invalid> - 2016-01-22 12:16 +0000
        Re: methodhandles lookup Jan Burse <janburse@fastmail.fm> - 2016-01-22 17:12 +0100
  Re: methodhandles lookup Martin Gregorie <martin@address-in-sig.invalid> - 2016-01-22 11:27 +0000
    Re: methodhandles lookup Philipp Kraus <philipp.kraus.flashpixx@gmail.com> - 2016-01-24 01:56 -0800
  Re: methodhandles lookup Jan Burse <janburse@fastmail.fm> - 2016-01-22 16:49 +0100

csiph-web