[ https://issues.apache.org/jira/browse/GROOVY-10571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17519179#comment-17519179 ]
Eric Milles commented on GROOVY-10571: -------------------------------------- You should be able to use an explicit class expression "Type.class" as a workaround. Or you could extend the referenced java type with a groovy type and use that as your type reference. > Stub generator misses sibling classes in annotation > --------------------------------------------------- > > Key: GROOVY-10571 > URL: https://issues.apache.org/jira/browse/GROOVY-10571 > Project: Groovy > Issue Type: Bug > Components: Stub generator / Joint compiler > Affects Versions: 4.0.1 > Reporter: Christopher Smith > Assignee: Eric Milles > Priority: Major > > To work around [a DynamoDB SDK bug that just turned > one|https://github.com/aws/aws-sdk-java-v2/issues/2347], I created an > attribute converter that ignores {{MetaClass}} and an {{AnnotationCollector}} > that applies it to record classes with some other usual POJO bits. > The annotation collector is in the same package as the converter-prvider Java > class. Running the stub generator produces this output (line breaks added): > {code} > @groovy.transform.AnnotationCollector() > @software.amazon.awssdk.enhanced.dynamodb.mapper.annotations.DynamoDbBean(converterProviders={IgnoreMetaClassAttributeConverterProvider,software.amazon.awssdk.enhanced.dynamodb.DefaultAttributeConverterProvider.class}) > @groovy.transform.stc.POJO() > @java.lang.annotation.Retention(value=java.lang.annotation.RetentionPolicy.SOURCE) > @java.lang.annotation.Target(value=java.lang.annotation.ElementType.TYPE) > public @interface DynamoDbRecord2{;} > {code} > Note the missing {{.class}} on the first class argument (which is not > imported and is present in the same package, but is a Java file). -- This message was sent by Atlassian Jira (v8.20.1#820001)