01: /*
02: * Spoon - http://spoon.gforge.inria.fr/
03: * Copyright (C) 2006 INRIA Futurs <renaud.pawlak@inria.fr>
04: *
05: * This software is governed by the CeCILL-C License under French law and
06: * abiding by the rules of distribution of free software. You can use, modify
07: * and/or redistribute the software under the terms of the CeCILL-C license as
08: * circulated by CEA, CNRS and INRIA at http://www.cecill.info.
09: *
10: * This program is distributed in the hope that it will be useful, but WITHOUT
11: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12: * FITNESS FOR A PARTICULAR PURPOSE. See the CeCILL-C License for more details.
13: *
14: * The fact that you are presently reading this means that you have had
15: * knowledge of the CeCILL-C license and that you accept its terms.
16: */
17:
18: package spoon.reflect.declaration;
19:
20: /**
21: * Represents a modifier on the declaration of a program element such as a
22: * class, method, or field.
23: */
24:
25: public enum ModifierKind {
26:
27: /** The modifier <tt>public</tt> */
28: PUBLIC,
29: /** The modifier <tt>protected</tt> */
30: PROTECTED,
31: /** The modifier <tt>private</tt> */
32: PRIVATE,
33: /** The modifier <tt>abstract</tt> */
34: ABSTRACT,
35: /** The modifier <tt>static</tt> */
36: STATIC,
37: /** The modifier <tt>final</tt> */
38: FINAL,
39: /** The modifier <tt>transient</tt> */
40: TRANSIENT,
41: /** The modifier <tt>volatile</tt> */
42: VOLATILE,
43: /** The modifier <tt>synchronized</tt> */
44: SYNCHRONIZED,
45: /** The modifier <tt>native</tt> */
46: NATIVE,
47: /** The modifier <tt>strictfp</tt> */
48: STRICTFP;
49:
50: private String lowercase = null; // modifier name in lowercase
51:
52: /**
53: * Returns this modifier's name in lowercase.
54: */
55: public String toString() {
56: if (lowercase == null) {
57: lowercase = name().toLowerCase(java.util.Locale.US);
58: }
59: return lowercase;
60: }
61: }
|