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.
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