• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Understanding Groovy’s decision logic for Method Invocation.

 
Ranch Hand
Posts: 211
Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Ranchers,

Attached is the image of Nassi-Shneidermann diagram of Groovy’s decision logic for method invocation.
Based on the flow diagram if the the method does not exist it calls GroovyObject.invokeMethod

I have written a scenario where the code does not comply the diagram in case if the method is missing.


Basically I have extended MetaClassImpl to capture all the MetaClass.invokeMethod calls. And also implemented invokeMethod in my object 'MyMarkupBuilder' to capture calls to GroovyObject.invokeMethod
I change the metaClass to my implementation and invocation goes to metaClass.invokeMethod instead of object.inokeMethod.

Definitely the diagram does further decision making which i am not aware of. If anyone can throw some light on this subject it will highly appreciated.

Regards,
Shroff.
Nassi-Shneidermann.png
[Thumbnail for Nassi-Shneidermann.png]
 
There is no greater crime than stealing somebody's best friend. I miss you tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic