aboutsummaryrefslogtreecommitdiffstats
path: root/weaver
diff options
context:
space:
mode:
Diffstat (limited to 'weaver')
-rw-r--r--weaver/src/main/java/org/aspectj/weaver/bcel/BcelTypeMunger.java58
-rw-r--r--weaver/src/main/java/org/aspectj/weaver/bcel/BcelWorld.java32
2 files changed, 63 insertions, 27 deletions
diff --git a/weaver/src/main/java/org/aspectj/weaver/bcel/BcelTypeMunger.java b/weaver/src/main/java/org/aspectj/weaver/bcel/BcelTypeMunger.java
index 1d33f417e..9e5b4268c 100644
--- a/weaver/src/main/java/org/aspectj/weaver/bcel/BcelTypeMunger.java
+++ b/weaver/src/main/java/org/aspectj/weaver/bcel/BcelTypeMunger.java
@@ -193,21 +193,36 @@ public class BcelTypeMunger extends ConcreteTypeMunger {
NewParentTypeMunger parentTM = (NewParentTypeMunger) munger;
if (parentTM.isMixin()) {
weaver.getWorld()
- .getMessageHandler()
- .handleMessage(
- WeaveMessage.constructWeavingMessage(WeaveMessage.WEAVEMESSAGE_MIXIN, new String[] {
- parentTM.getNewParent().getName(), fName, weaver.getLazyClassGen().getType().getName(),
- tName }, weaver.getLazyClassGen().getClassName(), getAspectType().getName()));
- } else {
+ .getMessageHandler()
+ .handleMessage(
+ WeaveMessage.constructWeavingMessage(
+ WeaveMessage.WEAVEMESSAGE_MIXIN,
+ new String[] {
+ parentTM.getNewParent().getName(), fName,
+ weaver.getLazyClassGen().getType().getName(), tName
+ },
+ weaver.getLazyClassGen().getClassName(), getAspectType().getName(),
+ parentTM.getNewParent().getSourceLocation(), weaver.getLazyClassGen().getType().getSourceLocation()
+ )
+ );
+ }
+ else {
if (parentTM.getNewParent().isInterface()) {
weaver.getWorld()
- .getMessageHandler()
- .handleMessage(
- WeaveMessage.constructWeavingMessage(WeaveMessage.WEAVEMESSAGE_DECLAREPARENTSIMPLEMENTS,
- new String[] { weaver.getLazyClassGen().getType().getName(), tName,
- parentTM.getNewParent().getName(), fName }, weaver.getLazyClassGen()
- .getClassName(), getAspectType().getName()));
- } else {
+ .getMessageHandler()
+ .handleMessage(
+ WeaveMessage.constructWeavingMessage(
+ WeaveMessage.WEAVEMESSAGE_DECLAREPARENTSIMPLEMENTS,
+ new String[] {
+ weaver.getLazyClassGen().getType().getName(), tName,
+ parentTM.getNewParent().getName(), fName
+ },
+ weaver.getLazyClassGen().getClassName(), getAspectType().getName(),
+ parentTM.getNewParent().getSourceLocation(), weaver.getLazyClassGen().getType().getSourceLocation()
+ )
+ );
+ }
+ else {
weaver.getWorld()
.getMessageHandler()
.handleMessage(
@@ -232,11 +247,18 @@ public class BcelTypeMunger extends ConcreteTypeMunger {
fromString = fName;
}
weaver.getWorld()
- .getMessageHandler()
- .handleMessage(
- WeaveMessage.constructWeavingMessage(WeaveMessage.WEAVEMESSAGE_ITD, new String[] {
- weaver.getLazyClassGen().getType().getName(), tName, kindString, getAspectType().getName(),
- fromString }, weaver.getLazyClassGen().getClassName(), getAspectType().getName()));
+ .getMessageHandler()
+ .handleMessage(
+ WeaveMessage.constructWeavingMessage(
+ WeaveMessage.WEAVEMESSAGE_ITD,
+ new String[] {
+ weaver.getLazyClassGen().getType().getName(), tName,
+ kindString, getAspectType().getName(), fromString
+ },
+ weaver.getLazyClassGen().getClassName(), getAspectType().getName(),
+ weaver.getLazyClassGen().getType().getSourceLocation(), getAspectType().getSourceLocation()
+ )
+ );
}
}
diff --git a/weaver/src/main/java/org/aspectj/weaver/bcel/BcelWorld.java b/weaver/src/main/java/org/aspectj/weaver/bcel/BcelWorld.java
index 745bd02b2..408b49870 100644
--- a/weaver/src/main/java/org/aspectj/weaver/bcel/BcelWorld.java
+++ b/weaver/src/main/java/org/aspectj/weaver/bcel/BcelWorld.java
@@ -190,17 +190,31 @@ public class BcelWorld extends World implements Repository {
String advisingType = advice.getConcreteAspect().getName();
Message msg = null;
if (advice.getKind().equals(AdviceKind.Softener)) {
- msg = WeaveMessage.constructWeavingMessage(WeaveMessage.WEAVEMESSAGE_SOFTENS, new String[] { advisedType,
- beautifyLocation(shadow.getSourceLocation()), advisingType, beautifyLocation(munger.getSourceLocation()) },
- advisedType, advisingType);
- } else {
+ msg = WeaveMessage.constructWeavingMessage(
+ WeaveMessage.WEAVEMESSAGE_SOFTENS,
+ new String[] {
+ advisedType, beautifyLocation(shadow.getSourceLocation()),
+ advisingType, beautifyLocation(munger.getSourceLocation())
+ },
+ advisedType, advisingType,
+ shadow.getSourceLocation(), munger.getSourceLocation()
+ );
+ }
+ else {
boolean runtimeTest = advice.hasDynamicTests();
String joinPointDescription = shadow.toString();
- msg = WeaveMessage
- .constructWeavingMessage(WeaveMessage.WEAVEMESSAGE_ADVISES,
- new String[] { joinPointDescription, advisedType, beautifyLocation(shadow.getSourceLocation()),
- description, advisingType, beautifyLocation(munger.getSourceLocation()),
- (runtimeTest ? " [with runtime test]" : "") }, advisedType, advisingType);
+ msg = WeaveMessage.constructWeavingMessage(
+ WeaveMessage.WEAVEMESSAGE_ADVISES,
+ new String[] {
+ joinPointDescription,
+ advisedType, beautifyLocation(shadow.getSourceLocation()),
+ description,
+ advisingType, beautifyLocation(munger.getSourceLocation()),
+ (runtimeTest ? " [with runtime test]" : "")
+ },
+ advisedType, advisingType,
+ shadow.getSourceLocation(), munger.getSourceLocation()
+ );
// Boolean.toString(runtimeTest)});
}
getMessageHandler().handleMessage(msg);