KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > net > innig > macker > structure > AccessModifier


1 /*______________________________________________________________________________
2  *
3  * Macker http://innig.net/macker/
4  *
5  * Copyright 2002-2003 Paul Cantrell
6  *
7  * This program is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License version 2, as published by the
9  * Free Software Foundation. See the file LICENSE.html for more information.
10  *
11  * This program is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY, including the implied warranty of MERCHANTABILITY or FITNESS
13  * FOR A PARTICULAR PURPOSE. See the license for more details.
14  *
15  * You should have received a copy of the GNU General Public License along with
16  * this program; if not, write to the Free Software Foundation, Inc. / 59 Temple
17  * Place, Suite 330 / Boston, MA 02111-1307 / USA.
18  *______________________________________________________________________________
19  */

20  
21 package net.innig.macker.structure;
22
23 import net.innig.util.OrderedType;
24
25 /**
26     Java access modifiers for classes and members.
27     Ordered by increasing visibility.
28 */

29 public class AccessModifier
30     extends OrderedType
31     {
32     public static final AccessModifier
33         PRIVATE = new AccessModifier("private"),
34         PACKAGE = new AccessModifier("package"),
35         PROTECTED = new AccessModifier("protected"),
36         PUBLIC = new AccessModifier("public");
37     
38     public static AccessModifier fromName(String JavaDoc name)
39         { return (AccessModifier) resolveFromName(AccessModifier.class, name); }
40     
41     private AccessModifier(String JavaDoc name) { super(name); }
42     }
Popular Tags