KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > spoon > reflect > declaration > ModifierKind


1 /*
2  * @(#)CtModifier.java 1.1 04/01/26
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package spoon.reflect.declaration;
9
10
11 /**
12  * Represents a modifier on the declaration of a program element such
13  * as a class, method, or field.
14  */

15
16 public enum ModifierKind {
17
18     /** The modifier <tt>public</tt> */ PUBLIC,
19     /** The modifier <tt>protected</tt> */ PROTECTED,
20     /** The modifier <tt>private</tt> */ PRIVATE,
21     /** The modifier <tt>abstract</tt> */ ABSTRACT,
22     /** The modifier <tt>static</tt> */ STATIC,
23     /** The modifier <tt>final</tt> */ FINAL,
24     /** The modifier <tt>transient</tt> */ TRANSIENT,
25     /** The modifier <tt>volatile</tt> */ VOLATILE,
26     /** The modifier <tt>synchronized</tt> */ SYNCHRONIZED,
27     /** The modifier <tt>native</tt> */ NATIVE,
28     /** The modifier <tt>strictfp</tt> */ STRICTFP;
29
30
31     private String JavaDoc lowercase = null; // modifier name in lowercase
32

33     /**
34      * Returns this modifier's name in lowercase.
35      */

36     public String JavaDoc toString() {
37     if (lowercase == null) {
38        lowercase = name().toLowerCase(java.util.Locale.US);
39     }
40     return lowercase;
41     }
42 }
43
Popular Tags