[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] final variables
|
A side note; it should be sufficient just match on "sets" in this
example. The "gets" should be redundant since all the static final
variables will have to be initialized!
Paulo Merson wrote:
Here's how you can check that the final *member variables* do not
contain lower case letters. There's a caveat: it doesn't work for
String or primitive type constants, because Java requires them to be
inlined. I also suggest specifying your package scope (e.g., "static
final * com.acme..*+.*a*") to avoid matching things like System.out.
declare warning :
get(static final * *a*) ||
set(static final * *a*) ||
get(static final * *b*) ||
set(static final * *b*) ||
...
get(static final * *z*) ||
set(static final * *z*) :
"Names of constants should not contain lower case letters.";
...
--
Dean Wampler, Ph.D.
dean at aspectprogramming.com
http://www.aspectprogramming.com
http://www.contract4j.org
I want my tombstone to say:
Unknown Application Error in Dean Wampler.exe.
Application Terminated.
[Okay] [Cancel]