Meta-Annotations with value()-Parameter

Hi,

is there a reason, why “value()” can’t be used inside meta-annotations?
If the parameter is named like the simple class name of the original annotation, then the parameter gets mapped right.
(axon-messaging, AnnotationUtils, resolveName Method)

Not Working Example:

`

@Target({ ElementType.TYPE, ElementType.ANNOTATION_TYPE })

@Retention(RetentionPolicy.RUNTIME)@Inherited

@Documented

@ProcessingGroup("")

public @interface MyProcessingGroup {

String value();

}

`

Working Example:

`

@Target({ ElementType.TYPE, ElementType.ANNOTATION_TYPE })

@Retention(RetentionPolicy.RUNTIME)@Inherited

@Documented

@ProcessingGroup("")

public @interface MyProcessingGroup {

String processingGroup();

}

`

Best Regards.
Johnny.

Hi Johnny,

to override the ‘value’ property of a meta-annotations, you have to use a property of the annotation name (lower case first letter).

In your case, you would define a property called ‘processingGroup’ on your ‘MyProcessingGroup’ class.

We didn’t have time yet to do the meta annotations using (yet more) annotations. Spring, for example, uses @AliasFor to allow you to name your properties any way you like.
So for now, you’re stuck with this convention.

Cheers,

Allard