boolean didSomething = false;
if (decA.matches(onType)) {
- // FIXME asc important this should be guarded by the 'already has annotation' check below but isn't since the compiler is producing classfiles with deca affected things in...
- AsmRelationshipProvider.getDefault().addDeclareAnnotationRelationship(decA.getSourceLocation(),onType.getSourceLocation());
-
- // FIXME asc same comment above applies here
- // TAG: WeavingMessage
- if (!getWorld().getMessageHandler().isIgnoring(IMessage.WEAVEINFO)){
- getWorld().getMessageHandler().handleMessage(
- WeaveMessage.constructWeavingMessage(WeaveMessage.WEAVEMESSAGE_ANNOTATES,
- new String[]{
- onType.toString(),
- Utility.beautifyLocation(onType.getSourceLocation()),
- decA.getAnnotationString(),
- "type",
- decA.getAspect().toString(),
- Utility.beautifyLocation(decA.getSourceLocation())
- }));
- }
-
-
if (onType.hasAnnotation(decA.getAnnotationX().getSignature())) {
-// FIXME asc Could put out a lint here for an already annotated type - the problem is that it may have
-// picked up the annotation during 'source weaving' in which case the message is misleading. Leaving it
-// off for now...
+ // Could put out a lint here for an already annotated type ...
// if (reportProblems) {
// world.getLint().elementAlreadyAnnotated.signal(
// new String[]{onType.toString(),decA.getAnnotationTypeX().toString()},
boolean problemReported = verifyTargetIsOK(decA, onType, annoX,reportProblems);
if (!problemReported) {
+ AsmRelationshipProvider.getDefault().addDeclareAnnotationRelationship(decA.getSourceLocation(),onType.getSourceLocation());
+ // TAG: WeavingMessage
+ if (!getWorld().getMessageHandler().isIgnoring(IMessage.WEAVEINFO)){
+ getWorld().getMessageHandler().handleMessage(
+ WeaveMessage.constructWeavingMessage(WeaveMessage.WEAVEMESSAGE_ANNOTATES,
+ new String[]{
+ onType.toString(),
+ Utility.beautifyLocation(onType.getSourceLocation()),
+ decA.getAnnotationString(),
+ "type",
+ decA.getAspect().toString(),
+ Utility.beautifyLocation(decA.getSourceLocation())
+ }));
+ }
didSomething = true;
ResolvedTypeMunger newAnnotationTM = new AnnotationOnTypeMunger(annoX);
newAnnotationTM.setSourceLocation(decA.getSourceLocation());