You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2023/09/03 14:53:00 UTC

[jira] [Commented] (GROOVY-6765) Support @Inherited on transform annotations

    [ https://issues.apache.org/jira/browse/GROOVY-6765?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17761611#comment-17761611 ] 

Eric Milles commented on GROOVY-6765:
-------------------------------------

You could add the transform via config script with any filtering logic you require:
{code:groovy}
withConfig(configuration) {
  source(classValidator: { /*test extends or whatever*/ }) {
    ast(foo.bar.BazAnnotation)
  }
}
{code}

> Support @Inherited on transform annotations
> -------------------------------------------
>
>                 Key: GROOVY-6765
>                 URL: https://issues.apache.org/jira/browse/GROOVY-6765
>             Project: Groovy
>          Issue Type: Improvement
>            Reporter: Peter Niederwieser
>            Priority: Major
>
> Currently, there doesn't appear to be a way to apply a local transform to a whole class inheritance hierarchy, rather than a single class. It would be good if a transform-triggering annotation marked with @Inherited would also trigger the transform for subclasses. This is in line with the meaning of @Inherited in runtime reflection, and would mean that the global transform "hammer" is needed less often.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)