src/share/classes/com/sun/tools/javac/code/Flags.java

changeset 1366
12cf6bfd8c05
parent 1357
c75be5bc5283
child 1384
bf54daa9dcd8
equal deleted inserted replaced
1365:2013982bee34 1366:12cf6bfd8c05
65 if ((mask&VOLATILE) != 0) flags.add(Flag.VOLATILE); 65 if ((mask&VOLATILE) != 0) flags.add(Flag.VOLATILE);
66 if ((mask&TRANSIENT) != 0) flags.add(Flag.TRANSIENT); 66 if ((mask&TRANSIENT) != 0) flags.add(Flag.TRANSIENT);
67 if ((mask&NATIVE) != 0) flags.add(Flag.NATIVE); 67 if ((mask&NATIVE) != 0) flags.add(Flag.NATIVE);
68 if ((mask&INTERFACE) != 0) flags.add(Flag.INTERFACE); 68 if ((mask&INTERFACE) != 0) flags.add(Flag.INTERFACE);
69 if ((mask&ABSTRACT) != 0) flags.add(Flag.ABSTRACT); 69 if ((mask&ABSTRACT) != 0) flags.add(Flag.ABSTRACT);
70 if ((mask&DEFAULT) != 0) flags.add(Flag.DEFAULT);
70 if ((mask&STRICTFP) != 0) flags.add(Flag.STRICTFP); 71 if ((mask&STRICTFP) != 0) flags.add(Flag.STRICTFP);
71 if ((mask&BRIDGE) != 0) flags.add(Flag.BRIDGE); 72 if ((mask&BRIDGE) != 0) flags.add(Flag.BRIDGE);
72 if ((mask&SYNTHETIC) != 0) flags.add(Flag.SYNTHETIC); 73 if ((mask&SYNTHETIC) != 0) flags.add(Flag.SYNTHETIC);
73 if ((mask&DEPRECATED) != 0) flags.add(Flag.DEPRECATED); 74 if ((mask&DEPRECATED) != 0) flags.add(Flag.DEPRECATED);
74 if ((mask&HASINIT) != 0) flags.add(Flag.HASINIT); 75 if ((mask&HASINIT) != 0) flags.add(Flag.HASINIT);
250 /** 251 /**
251 * Flag that marks non-override equivalent methods with the same signature 252 * Flag that marks non-override equivalent methods with the same signature
252 */ 253 */
253 public static final long CLASH = 1L<<42; 254 public static final long CLASH = 1L<<42;
254 255
256 /**
257 * Flag that marks either a default method or an interface containing default methods
258 */
259 public static final long DEFAULT = 1L<<43;
260
255 /** Modifier masks. 261 /** Modifier masks.
256 */ 262 */
257 public static final int 263 public static final int
258 AccessFlags = PUBLIC | PROTECTED | PRIVATE, 264 AccessFlags = PUBLIC | PROTECTED | PRIVATE,
259 LocalClassFlags = FINAL | ABSTRACT | STRICTFP | ENUM | SYNTHETIC, 265 LocalClassFlags = FINAL | ABSTRACT | STRICTFP | ENUM | SYNTHETIC,
265 ConstructorFlags = AccessFlags, 271 ConstructorFlags = AccessFlags,
266 InterfaceMethodFlags = ABSTRACT | PUBLIC, 272 InterfaceMethodFlags = ABSTRACT | PUBLIC,
267 MethodFlags = AccessFlags | ABSTRACT | STATIC | NATIVE | 273 MethodFlags = AccessFlags | ABSTRACT | STATIC | NATIVE |
268 SYNCHRONIZED | FINAL | STRICTFP; 274 SYNCHRONIZED | FINAL | STRICTFP;
269 public static final long 275 public static final long
270 LocalVarFlags = FINAL | PARAMETER; 276 ExtendedStandardFlags = (long)StandardFlags | DEFAULT,
277 InterfaceDefaultMethodMask = ABSTRACT | PUBLIC | STRICTFP | SYNCHRONIZED | DEFAULT,
278 LocalVarFlags = FINAL | PARAMETER;
279
271 280
272 public static Set<Modifier> asModifierSet(long flags) { 281 public static Set<Modifier> asModifierSet(long flags) {
273 Set<Modifier> modifiers = modifierSets.get(flags); 282 Set<Modifier> modifiers = modifierSets.get(flags);
274 if (modifiers == null) { 283 if (modifiers == null) {
275 modifiers = java.util.EnumSet.noneOf(Modifier.class); 284 modifiers = java.util.EnumSet.noneOf(Modifier.class);
318 VOLATILE("volatile"), 327 VOLATILE("volatile"),
319 TRANSIENT("transient"), 328 TRANSIENT("transient"),
320 NATIVE("native"), 329 NATIVE("native"),
321 INTERFACE("interface"), 330 INTERFACE("interface"),
322 ABSTRACT("abstract"), 331 ABSTRACT("abstract"),
332 DEFAULT("default"),
323 STRICTFP("strictfp"), 333 STRICTFP("strictfp"),
324 BRIDGE("bridge"), 334 BRIDGE("bridge"),
325 SYNTHETIC("synthetic"), 335 SYNTHETIC("synthetic"),
326 DEPRECATED("deprecated"), 336 DEPRECATED("deprecated"),
327 HASINIT("hasinit"), 337 HASINIT("hasinit"),

mercurial