Dynamic values are not supported as attributes in annotation- AspectJ Android [AOP Android] -
i using custom annotation log id user clicked. getting error "attribute value must constant". code snippet below.
massetid= asset.getcontentid(); @trackevent("track_event") @arrayparams({@params(key = "content_id",value = massetid)}) protected void attributemethod() { }
thanks in advance. there way pass dynamic values in annotation rather static variables or constants. using aspectj library android.
it's not possible specify runtime values in annotation attributes, constants, , set of possible types limited few types:
primitives, string, class, enums, annotations, , arrays of preceding types
according java 5 language guide - annotations.
Comments
Post a Comment