Bug 329925 - Form of declare annotation that removes annotations
Summary: Form of declare annotation that removes annotations
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: DEVELOPMENT   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: 1.6.11   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-10 12:11 EST by Andrew Clement CLA
Modified: 2010-12-09 16:46 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Clement CLA 2010-11-10 12:11:51 EST
Unlike removing entries from a type hierarchy, removing annotations is far less dangerous and addresses some use cases. (eg. you want to switch from some bunch of annotations to another bunch).  So we need something like

  declare @remove_field: int i: @Anno

(syntax not yet decided).
Comment 1 Andrew Clement CLA 2010-11-25 17:06:13 EST
Syntax is

declare @field: int A.i: -@Foo

Tasks still to do:
1) tests for specifying multiple annotations.  Grammar won't allow '-' before each one I think (right now) - should just police it and prevent it for now.
2) police usage of '-' with other annotation declares (constructor/method/type) - error message required (compiler limitation right now)
3) grammar had support for '+' added, need to police that as well with an appropriate error for now
Comment 2 Andrew Clement CLA 2010-11-26 14:54:44 EST
As Andrew discovered - need to do something about values.  Probably -@Foo doesn't allow values to be specified, and shouldn't enforce inclusion of values that have no default.
Comment 3 Andrew Clement CLA 2010-12-09 16:46:31 EST
fixed for 1.6.11 - will need another bug to cover the other declare variants as use cases come up.