I hava below custom annotation,
@Inherited
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface MyAnno {
String value() default "";
// use constants value defined in other file
int capacity() default com.constant.Constant.MAX_DATA_ROW;
}
I got a compile error say:
"Attribute value must be constant"
I don't want to write a direct value to default but I want to refer it from other class. so how can I accomplish that ?