KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > reflect > spi > ModifierInfo


1 /*
2 * JBoss, Home of Professional Open Source
3 * Copyright 2005, JBoss Inc., and individual contributors as indicated
4 * by the @authors tag. See the copyright.txt in the distribution for a
5 * full listing of individual contributors.
6 *
7 * This is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU Lesser General Public License as
9 * published by the Free Software Foundation; either version 2.1 of
10 * the License, or (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this software; if not, write to the Free
19 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21 */

22 package org.jboss.reflect.spi;
23
24 import java.lang.reflect.Modifier JavaDoc;
25
26 /**
27  * Modifier info
28  *
29  * @author <a HREF="mailto:adrian@jboss.org">Adrian Brock</a>
30  */

31 public interface ModifierInfo
32 {
33    /** Final */
34    public static final int FINAL = Modifier.FINAL;
35
36    /** Static */
37    public static final int STATIC = Modifier.STATIC;
38
39    /** Abstract */
40    public static final int ABSTRACT = Modifier.ABSTRACT;
41
42    /** Public */
43    public static final int PUBLIC = Modifier.PUBLIC;
44
45    /** Protected */
46    public static final int PROTECTED = Modifier.PROTECTED;
47
48    /** Package */
49    public static final int PACKAGE = 0;
50
51    /** Private */
52    public static final int PRIVATE = Modifier.PRIVATE;
53
54    /** A constant */
55    public static final int CONSTANT = STATIC + FINAL;
56
57    /** A public constant */
58    public static final int PUBLIC_CONSTANT = PUBLIC + CONSTANT;
59
60    /** A protected constant */
61    public static final int PROTECTED_CONSTANT = PROTECTED + CONSTANT;
62
63    /** A package constant */
64    public static final int PACKAGE_CONSTANT = CONSTANT;
65
66    /** A private constant */
67    public static final int PRIVATE_CONSTANT = PRIVATE + CONSTANT;
68
69    /** Public Static */
70    public static final int PUBLIC_STATIC = PUBLIC + STATIC;
71
72    /** Protected Static */
73    public static final int PROTECTED_STATIC = PROTECTED + STATIC;
74
75    /** Package Static */
76    public static final int PACKAGE_STATIC = STATIC;
77
78    /** Private Static */
79    public static final int PRIVATE_STATIC = PRIVATE + STATIC;
80
81    /** Public Abstract */
82    public static final int PUBLIC_ABSTRACT = PUBLIC + ABSTRACT;
83
84    /** Protected Abstract */
85    public static final int PROTECTED_ABSTRACT = PROTECTED + ABSTRACT;
86
87    /** Package Abstract */
88    public static final int PACKAGE_ABSTRACT = ABSTRACT;
89
90    /**
91     * Get the modifiers
92     *
93     * @return the modifiers
94     */

95    int getModifiers();
96    
97    /**
98     * Whether it is public
99     *
100     * @return true when public
101     */

102    boolean isPublic();
103    
104    /**
105     * Whether it is static
106     *
107     * @return true when static
108     */

109    boolean isStatic();
110 }
111
Popular Tags