You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by GitBox <gi...@apache.org> on 2021/03/13 00:45:08 UTC

[GitHub] [groovy] eric-milles edited a comment on pull request #1515: GROOVY-9807: limit receiver replacement for implicit-this in inner class

eric-milles edited a comment on pull request #1515:
URL: https://github.com/apache/groovy/pull/1515#issuecomment-797832914


   > `GroovyCodeVisitorAdapter` is for specific purpose, so how about making it AIC instead of standalone new class?
   
   What is missing from `GroovyCodeVisitor` and `CodeVisitorSupport` is the ability to override select methods of interest and restrict traversal.  If I were to create a straight AIC of `GroovyCodeVisitor` in `InvocationWriter#isThis`, the method would be hundreds of lines long and the number of imports for the class would double.  This adapter is useful outside of this particular application -- in fact I imported the implementation from groovy-eclipse.
   
   If `InvocationWriter` was a groovy source, I could use `@AutoImplement` to get the same result.  Java requires a more verbose approach, as usual.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org