• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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]
reply
    Bookmark Topic Watch Topic
  • New Topic