Bug 400122 - Support 'public static final String' as message in declare error/warning grammar
Summary: Support 'public static final String' as message in declare error/warning grammar
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-06 11:41 EST by Matthew Adams CLA
Modified: 2013-02-06 11:41 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 Matthew Adams CLA 2013-02-06 11:41:47 EST
Currently, ajc errs if I use a public static final String as the message in a declare error or declare warning statement.  It only expects a literal string value.

I'd like to do this to support a subaspect's use of a message defined in its superaspect.

=====

public abstract aspect Super {
  public static final String MESSAGE = "...";

  pointcut sup() : ...;
}

=====

public aspect Sub extends Super {
  pointcut sub() : ...;

  declare error : sup() && sub() : MESSAGE;
}