01: /*
02: * @(#)Member.java 1.16 06/10/10
03: *
04: * Copyright 1990-2006 Sun Microsystems, Inc. All Rights Reserved.
05: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER
06: *
07: * This program is free software; you can redistribute it and/or
08: * modify it under the terms of the GNU General Public License version
09: * 2 only, as published by the Free Software Foundation.
10: *
11: * This program is distributed in the hope that it will be useful, but
12: * WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * General Public License version 2 for more details (a copy is
15: * included at /legal/license.txt).
16: *
17: * You should have received a copy of the GNU General Public License
18: * version 2 along with this work; if not, write to the Free Software
19: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20: * 02110-1301 USA
21: *
22: * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
23: * Clara, CA 95054 or visit www.sun.com if you need additional
24: * information or have any questions.
25: *
26: */
27:
28: package java.lang.reflect;
29:
30: /**
31: * Member is an interface that reflects identifying information about
32: * a single member (a field or a method) or a constructor.
33: *
34: * @see java.lang.Class
35: * @see Field
36: * @see Method
37: * @see Constructor
38: *
39: * @author Nakul Saraiya
40: */
41: public interface Member {
42:
43: /**
44: * Identifies the set of all public members of a class or interface,
45: * including inherited members.
46: * @see java.lang.SecurityManager#checkMemberAccess
47: */
48: public static final int PUBLIC = 0;
49:
50: /**
51: * Identifies the set of declared members of a class or interface.
52: * Inherited members are not included.
53: * @see java.lang.SecurityManager#checkMemberAccess
54: */
55: public static final int DECLARED = 1;
56:
57: /**
58: * Returns the Class object representing the class or interface
59: * that declares the member or constructor represented by this Member.
60: *
61: * @return an object representing the declaring class of the
62: * underlying member
63: */
64: public Class getDeclaringClass();
65:
66: /**
67: * Returns the simple name of the underlying member or constructor
68: * represented by this Member.
69: *
70: * @return the simple name of the underlying member
71: */
72: public String getName();
73:
74: /**
75: * Returns the Java language modifiers for the member or
76: * constructor represented by this Member, as an integer. The
77: * Modifier class should be used to decode the modifiers in
78: * the integer.
79: *
80: * @return the Java language modifiers for the underlying member
81: * @see Modifier
82: */
83: public int getModifiers();
84:
85: }
|