• Post Reply Bookmark Topic Watch Topic
  • New Topic

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.

Regards,
Shroff.
Nassi-Shneidermann.png
[Thumbnail for Nassi-Shneidermann.png]
 
She'll be back. I'm just gonna wait here. With this tiny ad:
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!