diff options
author | Szabolcs Berecz <szabolcs.berecz@gmail.com> | 2012-02-03 19:19:00 +0100 |
---|---|---|
committer | Szabolcs Berecz <szabolcs.berecz@gmail.com> | 2012-02-15 23:14:40 +0100 |
commit | b8b19b1ca1de01083cf0975226a34424bd729a5b (patch) | |
tree | 4c71c89d262107cf62ec573ca83716df5c39c3c3 /src | |
parent | 883b7442b90eb2b1184e9d33cb511a24c507fdaf (diff) | |
download | scala-b8b19b1ca1de01083cf0975226a34424bd729a5b.tar.gz scala-b8b19b1ca1de01083cf0975226a34424bd729a5b.tar.bz2 scala-b8b19b1ca1de01083cf0975226a34424bd729a5b.zip |
let fjbg know about the synchronized flag
Diffstat (limited to 'src')
-rw-r--r-- | src/fjbg/ch/epfl/lamp/fjbg/JAccessFlags.java | 1 | ||||
-rw-r--r-- | src/fjbg/ch/epfl/lamp/fjbg/JFieldOrMethod.java | 4 | ||||
-rw-r--r-- | src/fjbg/ch/epfl/lamp/fjbg/JMethod.java | 1 |
3 files changed, 6 insertions, 0 deletions
diff --git a/src/fjbg/ch/epfl/lamp/fjbg/JAccessFlags.java b/src/fjbg/ch/epfl/lamp/fjbg/JAccessFlags.java index 0a48fc1628..d254acbdc1 100644 --- a/src/fjbg/ch/epfl/lamp/fjbg/JAccessFlags.java +++ b/src/fjbg/ch/epfl/lamp/fjbg/JAccessFlags.java @@ -19,6 +19,7 @@ public interface JAccessFlags { public static int ACC_STATIC = 0x0008; public static int ACC_FINAL = 0x0010; public static int ACC_SUPER = 0x0020; + public static int ACC_SYNCHRONIZED = 0x0020; public static int ACC_VOLATILE = 0x0040; public static int ACC_TRANSIENT = 0x0080; public static int ACC_NATIVE = 0x0100; diff --git a/src/fjbg/ch/epfl/lamp/fjbg/JFieldOrMethod.java b/src/fjbg/ch/epfl/lamp/fjbg/JFieldOrMethod.java index 3d2bf87264..beb76893f6 100644 --- a/src/fjbg/ch/epfl/lamp/fjbg/JFieldOrMethod.java +++ b/src/fjbg/ch/epfl/lamp/fjbg/JFieldOrMethod.java @@ -121,6 +121,10 @@ abstract public class JFieldOrMethod extends JMember { return (accessFlags & JAccessFlags.ACC_VARARGS) != 0; } + public boolean isSynchronized() { + return (accessFlags & JAccessFlags.ACC_SYNCHRONIZED) != 0; + } + public void writeTo(DataOutputStream stream) throws IOException { if (! frozen) { try { diff --git a/src/fjbg/ch/epfl/lamp/fjbg/JMethod.java b/src/fjbg/ch/epfl/lamp/fjbg/JMethod.java index ad35c76da3..9b9da3c0aa 100644 --- a/src/fjbg/ch/epfl/lamp/fjbg/JMethod.java +++ b/src/fjbg/ch/epfl/lamp/fjbg/JMethod.java @@ -194,6 +194,7 @@ public class JMethod extends JFieldOrMethod { else if (isNative()) buf.append("native "); if (isAbstract()) buf.append("abstract "); else if (isFinal()) buf.append("final "); + if (isSynchronized()) buf.append("synchronized "); return buf.toString(); } } |