Thinking a little bit more about that, you can almost use a lambda proxy
as a reflect proxy,
yes, almost because the lambda metafactory doesn't understand varargs.
class Main {
public static void print(Object... args) {
System.out.println(Arrays.toString(args));
}
public static void m
Am 09.10.2014 19:07, schrieb Remi Forax:
public static void main(String[] args) throws NoSuchFieldException,
IllegalArgumentException, IllegalAccessException {
Lookup lookup = MethodHandles.publicLookup().in(Consumer.class);
Field allowedModes = Lookup.class.getDeclaredField("allowedMod
Am 09.10.2014 17:32, schrieb Alessio Stalla:
[...]
Well, you can extend this technique by using more method references and
delegation (yes, even more levels of indirection!),
in short: I should just produce my own proxy system ;) Or in other
words, there is no proper replacement in the JDK for
public static void main(String[] args) throws NoSuchFieldException,
IllegalArgumentException, IllegalAccessException {
Lookup lookup = MethodHandles.publicLookup().in(Consumer.class);
Field allowedModes = Lookup.class.getDeclaredField("allowedModes");
allowedModes.setAccessible(true);
Looks fine Konstantin.
(These tests have been failing very often since they were pushed. If
your fix isn't pushed today, I'd argue for the tests being excluded.)
Thanks,
-Joe
On 10/9/2014 1:44 AM, Konstantin Shefov wrote:
Hi,
I have updated the webrev to take into account the JDK 9 new fea
On Thu, Oct 9, 2014 at 5:22 PM, Jochen Theodorou wrote:
> Am 09.10.2014 17:02, schrieb Alessio Stalla:
>
>> "All problems in computer science can be solved by another level of
>> indirection"... "except for the problem of too many layers of
>> indirection".
>>
>> What about (untested):
>>
>> Cons
Am 09.10.2014 17:02, schrieb Alessio Stalla:
"All problems in computer science can be solved by another level of
indirection"... "except for the problem of too many layers of indirection".
What about (untested):
Consumer proxy = Proxy.newProxyInstance(...);
Consumer myConsumer = proxy::accept;
Am 09.10.2014 16:51, schrieb Vladimir Ivanov:
Jochen,
too bad no-one knows. Has anyone an idea for a better place to ask this?
(btw, because of the getSimpleName issue I can't use MethodHandleProxies)
FYI, I plan to get MethodType.toString() problem fixed in 8u40.
I wish you would know how o
"All problems in computer science can be solved by another level of
indirection"... "except for the problem of too many layers of indirection".
What about (untested):
Consumer proxy = Proxy.newProxyInstance(...);
Consumer myConsumer = proxy::accept;
If you keep the proxy inaccessible, nobody wil
Jochen,
too bad no-one knows. Has anyone an idea for a better place to ask this?
(btw, because of the getSimpleName issue I can't use MethodHandleProxies)
FYI, I plan to get MethodType.toString() problem fixed in 8u40.
Best regards,
Vladimir Ivanov
Am 06.10.2014 18:06, schrieb Jochen Theodo
too bad no-one knows. Has anyone an idea for a better place to ask this?
(btw, because of the getSimpleName issue I can't use MethodHandleProxies)
Am 06.10.2014 18:06, schrieb Jochen Theodorou:
Hi,
I find this a little odd and I wonder how you are supposed to do it
right. Or if that is a bug
Hi,
I have updated the webrev to take into account the JDK 9 new feature
with segmented code cache.
http://cr.openjdk.java.net/~kshefov/8058733/webrev.02
Please, review.
-Konstantin
On 08.10.2014 21:25, Joe Darcy wrote:
Hello,
I approve this change going into jdk9/dev contingent on the fai
12 matches
Mail list logo