[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[aspectj-users] Re: How to disable [Xlint:typeNotExposedToWeaver] and is it
|
Hi Adrian-,
As I tried to emphasize in the original message, the
warnings refer to interfaces that ARE DEFINITELY in
the standard -classpath for AJC and I can prove that
(by running ant -verbose). After little tweaking I
discovered that this is not enough - the jar with the
said interfaces should be added to the -aspectpath
instead (or in addition to the -classpath?). This was
unexpected - for another declaration in the attached
aspect:
com.vividsolutions.jts.geom..
I got no warnings (see attached file), though its jar
is not in the -aspectpath either.
How I missed this in the docs (are there any good
explanation on the purpose of -aspectpath AT ALL?) I
can not explain :-)
The thing that thick me off was the build.xml in the
AspectJ1.2 examples directory, where the aspectpath
sysprperty has duplicate stuff from the classpath
entry.
I appreciate your help,
Hristo
---------------------------------------------------
You can disable the warning, but you might not want
to....
As the error message suggests, this is an Xlint
warning: Xlint warnings
can be individually tailored for severity levels
(error, warning, ignore),
by passing the ajc compiler the -Xlintfile option, and
specifying a
properties file adhering to the format in
org/aspectj/weaver/XlintDefault.properties (see the
AspectJ Development
Environment Guide linked from the AspectJ
Documentation page, or included
in the doc directory of the AspectJ distribution).
Now for why you might not want to disable the warning
- it's telling you
something of potential importance. You asked AspectJ
to make
org.geotools.feature.FeatureType and any types that
extend it implement
AutoPersist. If the type FeatureType is not available
('exposed to') the
weaver, then ajc cannot implement your declare parents
request for that
type. If you meant to only add the interface to your
own subtypes of
FeatureType, then in this case you could write:
(org.geotools.feature.FeatureType+ &&
!org.geotools.feature.FeatureType)
-- Adrian
Adrian_Colyer@xxxxxxxxxx
Hristo Stoyanov
---------------------------------
Sent by: aspectj-users-admin@xxxxxxxxxxx
29/07/2004 00:30
Please respond to
aspectj-users
To
aspectj-users@xxxxxxxxxxx
cc
Subject
[aspectj-users] How to disable
[Xlint:typeNotExposedToWeaver] and is it a
bad warning
Ha all-,
I am getting this warning with AJC1.2:
-----------------------------------------
PerstGeometry.aj:14 warning this affected type is not
exposed to the weaver:
org.geotools.feature.FeatureType
[Xlint:typeNotExposedToWeaver]
declare parents:
(
com.vividsolutions.jts..
||
org.geotools.feature.AttributeType+
||
org.geotools.feature.Feature+
||
org.geotools.feature.FeatureType+
||
org.geotools.feature.FeatureCollection+
) implements AutoPersist;
-----------------------------------------
I do not understand why AJC insists on having the Java
source code - if it happens to be J2SE 5.0 stuff (with
generics, enums,etc.) - it won't understand it... I am
pretty sure AJC has access to the compiled class,
since I can clearly see the relevant jar file with on
the AJC's classpath?
How do I disable this warning and is it dangerous?
Thanks
Hristo
__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail
Attachment:
PerstGeometry.aj
Description: PerstGeometry.aj