KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > gjt > jclasslib > structures > AccessFlags


1 /*
2     This library is free software; you can redistribute it and/or
3     modify it under the terms of the GNU General Public
4     License as published by the Free Software Foundation; either
5     version 2 of the license, or (at your option) any later version.
6 */

7
8 package org.gjt.jclasslib.structures;
9
10 /**
11  * Defines access flags constants and verbose expressions as defined by
12  * the java access modifiers.
13  *
14  * @author <a HREF="mailto:jclasslib@ej-technologies.com">Ingo Kegel</a>, <a HREF="mailto:vitor.carreira@gmail.com">Vitor Carreira</a>
15  * @version $Revision: 1.5 $ $Date: 2004/12/29 10:45:58 $
16  */

17 public interface AccessFlags {
18
19     public static final int ACC_PUBLIC = 0x0001;
20     public static final int ACC_PRIVATE = 0x0002;
21     public static final int ACC_PROTECTED = 0x0004;
22     public static final int ACC_STATIC = 0x0008;
23     public static final int ACC_FINAL = 0x0010;
24     public static final int ACC_SYNCHRONIZED = 0x0020;
25     /**
26      * For ClassFile structures, 0x0020 is ACC_SUPER, which has historical significance only
27      */

28     public static final int ACC_SUPER = 0x0020;
29     public static final int ACC_VOLATILE = 0x0040;
30     public static final int ACC_TRANSIENT = 0x0080;
31
32     public static final int ACC_NATIVE = 0x0100;
33     public static final int ACC_INTERFACE = 0x0200;
34     public static final int ACC_ABSTRACT = 0x0400;
35     public static final int ACC_STRICT = 0x0800;
36
37     /**
38      * new in Java 1.4
39      */

40     public final static int ACC_SYNTHETIC = 0x1000;
41     /**
42      * new in Java 1.5
43      */

44     public final static int ACC_ANNOTATION = 0x2000;
45     /**
46      * new in Java 1.5
47      */

48     public final static int ACC_ENUM = 0x4000;
49     /**
50      * new in Java 1.5
51      */

52     public final static int ACC_BRIDGE = 0x0040;
53     /**
54      * new in Java 1.5
55      */

56     public final static int ACC_VARARGS = 0x0080;
57
58
59     /**
60      * Class access flag bits for generating a verbose list in a loop.
61      */

62     public static final int[] CLASS_ACCESS_FLAGS = new int[]{
63         ACC_PUBLIC,
64         ACC_FINAL,
65         ACC_SUPER,
66         ACC_INTERFACE,
67         ACC_ABSTRACT,
68         ACC_SYNTHETIC,
69         ACC_ANNOTATION,
70         ACC_ENUM
71     };
72
73     /**
74      * Inner class access flag bits for generating a verbose list in a loop.
75      */

76     public static final int[] INNER_CLASS_ACCESS_FLAGS = new int[]{
77         ACC_PUBLIC,
78         ACC_PRIVATE,
79         ACC_PROTECTED,
80         ACC_STATIC,
81         ACC_FINAL,
82         ACC_INTERFACE,
83         ACC_ABSTRACT,
84         ACC_SYNTHETIC,
85         ACC_ANNOTATION,
86         ACC_ENUM
87     };
88
89
90     /**
91      * Field access flag bits for generating a verbose list in a loop.
92      */

93     public static final int[] FIELD_ACCESS_FLAGS = new int[]{
94         ACC_PUBLIC,
95         ACC_PRIVATE,
96         ACC_PROTECTED,
97         ACC_STATIC,
98         ACC_FINAL,
99         ACC_VOLATILE,
100         ACC_TRANSIENT,
101         ACC_SYNTHETIC,
102         ACC_ENUM
103     };
104
105     /**
106      * Method access flag bits for generating a verbose list in a loop.
107      */

108     public static final int[] METHOD_ACCESS_FLAGS = new int[]{
109         ACC_PUBLIC,
110         ACC_PRIVATE,
111         ACC_PROTECTED,
112         ACC_STATIC,
113         ACC_FINAL,
114         ACC_SYNCHRONIZED,
115         ACC_BRIDGE,
116         ACC_VARARGS,
117         ACC_NATIVE,
118         ACC_ABSTRACT,
119         ACC_STRICT,
120         ACC_SYNTHETIC
121     };
122
123     public static final String JavaDoc ACC_SUPER_VERBOSE = "";
124
125     public static final String JavaDoc ACC_PUBLIC_VERBOSE = "public";
126     public static final String JavaDoc ACC_PRIVATE_VERBOSE = "private";
127     public static final String JavaDoc ACC_PROTECTED_VERBOSE = "protected";
128     public static final String JavaDoc ACC_STATIC_VERBOSE = "static";
129     public static final String JavaDoc ACC_FINAL_VERBOSE = "final";
130     public static final String JavaDoc ACC_SYNCHRONIZED_VERBOSE = "synchronized";
131     public static final String JavaDoc ACC_VOLATILE_VERBOSE = "volatile";
132     public static final String JavaDoc ACC_TRANSIENT_VERBOSE = "transient";
133     public final static String JavaDoc ACC_BRIDGE_VERBOSE = "bridge";
134     public final static String JavaDoc ACC_VARARGS_VERBOSE = "varargs";
135     public static final String JavaDoc ACC_NATIVE_VERBOSE = "native";
136     public static final String JavaDoc ACC_INTERFACE_VERBOSE = "interface";
137     public static final String JavaDoc ACC_ABSTRACT_VERBOSE = "abstract";
138     public static final String JavaDoc ACC_STRICT_VERBOSE = "strict";
139     public final static String JavaDoc ACC_SYNTHETIC_VERBOSE = "synthetic";
140     public final static String JavaDoc ACC_ANNOTATION_VERBOSE = "annotation";
141     public final static String JavaDoc ACC_ENUM_VERBOSE = "enum";
142
143     /**
144      * Class verbose descriptions of access flag bits for generating a verbose
145      * list in a loop.
146      */

147     public static final String JavaDoc[] CLASS_ACCESS_FLAGS_VERBOSE = new String JavaDoc[]{
148         ACC_PUBLIC_VERBOSE,
149         ACC_FINAL_VERBOSE,
150         ACC_SUPER_VERBOSE,
151         ACC_INTERFACE_VERBOSE,
152         ACC_ABSTRACT_VERBOSE,
153         ACC_SYNTHETIC_VERBOSE,
154         ACC_ANNOTATION_VERBOSE,
155         ACC_ENUM_VERBOSE
156     };
157
158     /**
159      * Inner class verbose descriptions of access flag bits for generating a verbose
160      * list in a loop.
161      */

162     public static final String JavaDoc[] INNER_CLASS_ACCESS_FLAGS_VERBOSE = new String JavaDoc[]{
163         ACC_PUBLIC_VERBOSE,
164         ACC_PRIVATE_VERBOSE,
165         ACC_PROTECTED_VERBOSE,
166         ACC_STATIC_VERBOSE,
167         ACC_FINAL_VERBOSE,
168         ACC_INTERFACE_VERBOSE,
169         ACC_ABSTRACT_VERBOSE,
170         ACC_SYNTHETIC_VERBOSE,
171         ACC_ANNOTATION_VERBOSE,
172         ACC_ENUM_VERBOSE
173     };
174
175
176     /**
177      * Field verbose descriptions of access flag bits for generating a verbose
178      * list in a loop.
179      */

180     public static final String JavaDoc[] FIELD_ACCESS_FLAGS_VERBOSE = new String JavaDoc[]{
181         ACC_PUBLIC_VERBOSE,
182         ACC_PRIVATE_VERBOSE,
183         ACC_PROTECTED_VERBOSE,
184         ACC_STATIC_VERBOSE,
185         ACC_FINAL_VERBOSE,
186         ACC_VOLATILE_VERBOSE,
187         ACC_TRANSIENT_VERBOSE,
188         ACC_SYNTHETIC_VERBOSE,
189         ACC_ENUM_VERBOSE
190     };
191
192     /**
193      * Field verbose descriptions of access flag bits for generating a verbose
194      * list in a loop.
195      */

196     public static final String JavaDoc[] METHOD_ACCESS_FLAGS_VERBOSE = new String JavaDoc[]{
197         ACC_PUBLIC_VERBOSE,
198         ACC_PRIVATE_VERBOSE,
199         ACC_PROTECTED_VERBOSE,
200         ACC_STATIC_VERBOSE,
201         ACC_FINAL_VERBOSE,
202         ACC_SYNCHRONIZED_VERBOSE,
203         ACC_BRIDGE_VERBOSE,
204         ACC_VARARGS_VERBOSE,
205         ACC_NATIVE_VERBOSE,
206         ACC_ABSTRACT_VERBOSE,
207         ACC_STRICT_VERBOSE,
208         ACC_SYNTHETIC_VERBOSE
209     };
210 }
211
Popular Tags