import org.aspectj.bridge.MessageUtil;
import org.aspectj.bridge.WeaveMessage;
import org.aspectj.weaver.AjcMemberMaker;
+import org.aspectj.weaver.AnnotationOnTypeMunger;
import org.aspectj.weaver.AsmRelationshipProvider;
import org.aspectj.weaver.ConcreteTypeMunger;
import org.aspectj.weaver.Member;
changed = mungeNewConstructor(weaver, (NewConstructorTypeMunger)munger);
} else if (munger.getKind() == ResolvedTypeMunger.Parent) {
changed = mungeNewParent(weaver, (NewParentTypeMunger)munger);
+ } else if (munger.getKind() == ResolvedTypeMunger.AnnotationOnType) {
+ changed = mungeNewAnnotationOnType(weaver,(AnnotationOnTypeMunger)munger);
} else {
throw new RuntimeException("unimplemented");
}
}
return path.substring(takefrom+1);
}
+
+ private boolean mungeNewAnnotationOnType(BcelClassWeaver weaver,AnnotationOnTypeMunger munger) {
+ // FIXME asc this has already been done up front, need to do it here too?
+ weaver.getLazyClassGen().addAnnotation(munger.getNewAnnotation().getBcelAnnotation());
+ return true;
+ }
/**
* For a long time, AspectJ did not allow binary weaving of declare parents. This restriction is now lifted