Win a copy of Hands On Software Engineering with Python this week in the Jython/Python forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

Understanding Groovy’s decision logic for Method Invocation.  RSS feed

Ranch Hand
Posts: 209
Java Tomcat Server
  • Mark post as helpful
  • send pies
  • 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.

[Thumbnail for Nassi-Shneidermann.png]
I am a man of mystery. Mostly because of this tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!