--
You received this message because you are subscribed to the Google Groups "Drools Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-developm...@googlegroups.com.
To post to this group, send email to drools-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-development/b8b912fa-22f5-44e3-9c0d-3efeecab5b80%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
interface Walkable { void walk(); } interface Swimmable { void swim(); } interface Quackable { void quack(); }
interface Duck implements Walkable, Swimmable, Quackable {}
================
Where IsA keyword is registered ?
--
You received this message because you are subscribed to the Google Groups "Drools Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-developm...@googlegroups.com.
To post to this group, send email to drools-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-development/44f6accf-0a43-429f-808e-7e37654331d1%40googlegroups.com.
Yes I remember yous advice, just i miss understand how to do it. I will take a look to this new feature
Thanks
--
You received this message because you are subscribed to the Google Groups "Drools Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-developm...@googlegroups.com.
To post to this group, send email to drools-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-development/4343d23f-c949-4e26-9538-c4bc11cfe1d9%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-development/CANinqme%3DTzn-JePBvcrmK1HGJ%3DvEb7-62as8WRayAvftHBUyHQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-development/CA%2BWXhSyt%3D0QAPjRx8S-rTxkeX%2Bj-3zf%3DNmNANZZa4aVNTrgWRQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-development/CANinqmfR_FuG%3DhOX1XpMNvEHo-v%2ByK%3DeeyoQACuf1ZOBNPC4ow%40mail.gmail.com.
My understanding was that this is not a cast, but a static comparison between the class and the interface. That is, "as" returns true if the donning would only require hard fields, false otherwise. Generalizing to methods with args only requires a type compatibility check then.
If as returns true, then he would Don. I think that traits already shadow hard methods when available.
I'll be on Skype in 1hr or so
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-development/CA%2BWXhSzY-dkRbLh9nvJ8VhnP3gGL07stisr7tLbHDdPuFeF_cg%40mail.gmail.com.
Exactly
--
You received this message because you are subscribed to the Google Groups "Drools Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-developm...@googlegroups.com.
To post to this group, send email to drools-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-development/75e0f2ea-f68b-4228-8add-c7af3817cf10%40googlegroups.com.
@SuppressWarnings("unchecked")static <T> boolean fits(Class<T> t, final Object obj) {boolean result = true;try {Proxy.newProxyInstance(t.getClassLoader(), new Class[]{t},new InvocationHandler() {public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {try {return obj.getClass().getMethod(method.getName(), method.getParameterTypes()).invoke(obj, args);} catch (NoSuchMethodException nsme) {throw new NoSuchMethodError(nsme.getMessage());} catch (InvocationTargetException ite) {throw ite.getTargetException();}}});} catch (Exception e){result = false;}return result;}
--
You received this message because you are subscribed to the Google Groups "Drools Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drools-developm...@googlegroups.com.
To post to this group, send email to drools-de...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/drools-development/ec7f011f-bd88-4b8b-9d1c-3f3c08fe9bb7%40googlegroups.com.