Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-dev] declare annotation syntax

 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Alexandre Vasseur wrote:
> I think package anntotation are handled through a manifest, thus
> likely to be part of a build process or Ant responsabilty to inject
> things in the manifest.
No, not really. They are handled through a class which lies in the
package and has a special reserved name "package-info.java". (see
JSR-175)

> Any use case for declaring package
> annotations ?  
Well, I guess it would aid the specification of Type patterns in
general. Since I am personally working on verification: There it
might be very desirable to assert certain conditions for a certain
package.
 
Interestingly, the syntax then would be somewhat ambigous:

declare annotation : org.xyz.model..* : @BusinessDomain ;

Would that mean declaring an annotation on all contained types or
packages? But actually, declaring annotations on entire sets of
packages does not make much sense, so one could restrict it to:

declare annotation : org.xyz.model : @BusinessDomain ;

This is very clear syntax in my eyes.

Cheers,
Eric

- -- 
Eric Bodden
Chair I2 for Programming Languages and Program Analysis
RWTH Aachen University

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0.3

iQA/AwUBQfk0V8wiFCm7RlWCEQIEtACfUjJlzHgqh+timPVvORwUydj4UzoAnRwd
425VFK1fO9Gg08HuXUYFgJI/
=Iz+a
-----END PGP SIGNATURE-----




Back to the top