1 /* |
1 /* |
2 * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. Oracle designates this |
7 * published by the Free Software Foundation. Oracle designates this |
59 /** The modifier {@code volatile} */ VOLATILE, |
59 /** The modifier {@code volatile} */ VOLATILE, |
60 /** The modifier {@code synchronized} */ SYNCHRONIZED, |
60 /** The modifier {@code synchronized} */ SYNCHRONIZED, |
61 /** The modifier {@code native} */ NATIVE, |
61 /** The modifier {@code native} */ NATIVE, |
62 /** The modifier {@code strictfp} */ STRICTFP; |
62 /** The modifier {@code strictfp} */ STRICTFP; |
63 |
63 |
64 |
|
65 private String lowercase = null; // modifier name in lowercase |
|
66 |
|
67 /** |
64 /** |
68 * Returns this modifier's name in lowercase. |
65 * Returns this modifier's name in lowercase. |
69 */ |
66 */ |
70 public String toString() { |
67 public String toString() { |
71 if (lowercase == null) { |
68 return name().toLowerCase(java.util.Locale.US); |
72 lowercase = name().toLowerCase(java.util.Locale.US); |
|
73 } |
|
74 return lowercase; |
|
75 } |
69 } |
76 } |
70 } |