diff options
author | aclement <aclement> | 2006-06-08 09:27:12 +0000 |
---|---|---|
committer | aclement <aclement> | 2006-06-08 09:27:12 +0000 |
commit | 87ff820beb90bb1c989f873e9ad140a22bf63367 (patch) | |
tree | f0759bf6148e0126ee70445afe36457c52f25ca8 | |
parent | d779def920f62f51d284be100fd0f4b9bf7b2f0a (diff) | |
download | aspectj-87ff820beb90bb1c989f873e9ad140a22bf63367.tar.gz aspectj-87ff820beb90bb1c989f873e9ad140a22bf63367.zip |
synchronization joinpoints: code dump... uses world rather than messagehandler
-rw-r--r-- | weaver/src/org/aspectj/weaver/AjAttribute.java | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/weaver/src/org/aspectj/weaver/AjAttribute.java b/weaver/src/org/aspectj/weaver/AjAttribute.java index 66dbf9f25..6a7ff1ced 100644 --- a/weaver/src/org/aspectj/weaver/AjAttribute.java +++ b/weaver/src/org/aspectj/weaver/AjAttribute.java @@ -19,7 +19,6 @@ import java.io.DataOutputStream; import java.io.EOFException; import java.io.IOException; -import org.aspectj.bridge.IMessageHandler; import org.aspectj.bridge.MessageUtil; import org.aspectj.bridge.Version; import org.aspectj.util.FileUtil; @@ -85,7 +84,7 @@ public abstract class AjAttribute { } } - public static AjAttribute read(AjAttribute.WeaverVersionInfo v, String name, byte[] bytes, ISourceContext context,IMessageHandler msgHandler) { + public static AjAttribute read(AjAttribute.WeaverVersionInfo v, String name, byte[] bytes, ISourceContext context,World w) { try { if (bytes == null) bytes = new byte[0]; VersionedDataInputStream s = new VersionedDataInputStream(new ByteArrayInputStream(bytes)); @@ -99,9 +98,13 @@ public abstract class AjAttribute { } else if (name.equals(WeaverVersionInfo.AttributeName)) { return WeaverVersionInfo.read(s); } else if (name.equals(AdviceAttribute.AttributeName)) { - return AdviceAttribute.read(s, context); + AdviceAttribute aa = AdviceAttribute.read(s, context); + aa.getPointcut().check(context,w); + return aa; } else if (name.equals(PointcutDeclarationAttribute.AttributeName)) { - return new PointcutDeclarationAttribute(ResolvedPointcutDefinition.read(s, context)); + PointcutDeclarationAttribute pda = new PointcutDeclarationAttribute(ResolvedPointcutDefinition.read(s, context)); + pda.pointcutDef.getPointcut().check(context,w); + return pda; } else if (name.equals(TypeMunger.AttributeName)) { return new TypeMunger(ResolvedTypeMunger.read(s, context)); } else if (name.equals(AjSynthetic.AttributeName)) { @@ -116,8 +119,8 @@ public abstract class AjAttribute { return EffectiveSignatureAttribute.read(s, context); } else { // We have to tell the user about this... - if (msgHandler == null) throw new BCException("unknown attribute" + name); - msgHandler.handleMessage(MessageUtil.warn("unknown attribute encountered "+name)); + if (w == null || w.getMessageHandler()==null) throw new BCException("unknown attribute" + name); + w.getMessageHandler().handleMessage(MessageUtil.warn("unknown attribute encountered "+name)); return null; } } catch (IOException e) { @@ -657,5 +660,4 @@ public abstract class AjAttribute { } - } |