// ABSTRACT=16
public static final int FINAL=32;
public static final int NATIVE=64;
-// SYNCHRONIZED=128
+ public static final int SYNCHRONIZED=128;
// TRANSIENT=256
// VOLATILE=512
// STRICTFP=1024
public void addModifier(int mod) {
value|=mod;
+ if (isSynchronized()&&isNative())
+ throw new Error("Synchronized native methods are not supported");
+ }
+
+ public boolean isSynchronized() {
+ return ((value&SYNCHRONIZED)!=0);
}
public boolean isStatic() {
st+="final ";
if ((value&NATIVE)!=0)
st+="native ";
+ if ((value&SYNCHRONIZED)!=0)
+ st+="synchronized ";
return st;
}
}