KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > java > lang > reflect > Member


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

7
8 package java.lang.reflect;
9
10 /**
11  * Member is an interface that reflects identifying information about
12  * a single member (a field or a method) or a constructor.
13  *
14  * @see java.lang.Class
15  * @see Field
16  * @see Method
17  * @see Constructor
18  *
19  * @author Nakul Saraiya
20  */

21 public
22 interface Member {
23
24     /**
25      * Identifies the set of all public members of a class or interface,
26      * including inherited members.
27      * @see java.lang.SecurityManager#checkMemberAccess
28      */

29     public static final int PUBLIC = 0;
30
31     /**
32      * Identifies the set of declared members of a class or interface.
33      * Inherited members are not included.
34      * @see java.lang.SecurityManager#checkMemberAccess
35      */

36     public static final int DECLARED = 1;
37
38     /**
39      * Returns the Class object representing the class or interface
40      * that declares the member or constructor represented by this Member.
41      *
42      * @return an object representing the declaring class of the
43      * underlying member
44      */

45     public Class JavaDoc getDeclaringClass();
46
47     /**
48      * Returns the simple name of the underlying member or constructor
49      * represented by this Member.
50      *
51      * @return the simple name of the underlying member
52      */

53     public String JavaDoc getName();
54
55     /**
56      * Returns the Java language modifiers for the member or
57      * constructor represented by this Member, as an integer. The
58      * Modifier class should be used to decode the modifiers in
59      * the integer.
60      *
61      * @return the Java language modifiers for the underlying member
62      * @see Modifier
63      */

64     public int getModifiers();
65
66     /**
67      * Returns <tt>true</tt> if this member was introduced by
68      * the compiler; returns <tt>false</tt> otherwise.
69      *
70      * @return true if and only if this member was introduced by
71      * the compiler.
72      * @since 1.5
73      */

74     public boolean isSynthetic();
75 }
76
Popular Tags