373 private static final int CONSTRUCTOR_MODIFIERS = 374 Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE; 375 376 /** 377 * See JLSv3 section 8.4.3. 378 */ 379 private static final int METHOD_MODIFIERS = 380 Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE | 381 Modifier.ABSTRACT | Modifier.STATIC | Modifier.FINAL | 382 Modifier.SYNCHRONIZED | Modifier.NATIVE | Modifier.STRICT; 383 384 /** 385 * See JLSv3 section 8.3.1. 386 */ 387 private static final int FIELD_MODIFIERS = 388 Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE | 389 Modifier.STATIC | Modifier.FINAL | Modifier.TRANSIENT | 390 Modifier.VOLATILE; 391 392 /** 393 * Return an {@code int} value OR-ing together the source language 394 * modifiers that can be applied to a class. 395 * @return an {@code int} value OR-ing together the source language 396 * modifiers that can be applied to a class. 397 * 398 * @jls 8.1.1 Class Modifiers 399 * @since 1.7 400 */ 401 public static int classModifiers() { 402 return CLASS_MODIFIERS; 403 } 404 405 /** 406 * Return an {@code int} value OR-ing together the source language 407 * modifiers that can be applied to an interface. 408 * @return an {@code int} value OR-ing together the source language 409 * modifiers that can be applied to an inteface. 410 * 411 * @jls 9.1.1 Interface Modifiers 412 * @since 1.7 | 373 private static final int CONSTRUCTOR_MODIFIERS = 374 Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE; 375 376 /** 377 * See JLSv3 section 8.4.3. 378 */ 379 private static final int METHOD_MODIFIERS = 380 Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE | 381 Modifier.ABSTRACT | Modifier.STATIC | Modifier.FINAL | 382 Modifier.SYNCHRONIZED | Modifier.NATIVE | Modifier.STRICT; 383 384 /** 385 * See JLSv3 section 8.3.1. 386 */ 387 private static final int FIELD_MODIFIERS = 388 Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE | 389 Modifier.STATIC | Modifier.FINAL | Modifier.TRANSIENT | 390 Modifier.VOLATILE; 391 392 /** 393 * 394 */ 395 static final int ACCESS_MODIFIERS = 396 Modifier.PUBLIC | Modifier.PROTECTED | Modifier.PRIVATE; 397 398 /** 399 * Return an {@code int} value OR-ing together the source language 400 * modifiers that can be applied to a class. 401 * @return an {@code int} value OR-ing together the source language 402 * modifiers that can be applied to a class. 403 * 404 * @jls 8.1.1 Class Modifiers 405 * @since 1.7 406 */ 407 public static int classModifiers() { 408 return CLASS_MODIFIERS; 409 } 410 411 /** 412 * Return an {@code int} value OR-ing together the source language 413 * modifiers that can be applied to an interface. 414 * @return an {@code int} value OR-ing together the source language 415 * modifiers that can be applied to an inteface. 416 * 417 * @jls 9.1.1 Interface Modifiers 418 * @since 1.7 |