[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.jdt] Re: [Model] Bug on flags of IType

Romain Dervaux wrote:

Hi

I am parsing IType objects from IClassFile objects.
I noticed that for classes (not interfaces), the flags are always true for the synchronized modifier.


For a simple class like that :

public class A {

}
IType#getFlags() will return 33.
Not sure what you're doing but I correctly get 1 back for that type.

Dani
IModifierConstants.ACC_SYNCHRONIZED = 32
And as 33 & 32 != 0, all classes are considered synchronized.

If a class has an another modifier like 'static', it will not have the synchronized flag.

Hope that's clear.

Romain