java.lang.reflect
Interface Member

All Known Implementing Classes:
Constructor, Field, Method

public interface Member

Member is an interface that represents any member of a class (field or method) or a constructor. You can get information about the declaring class, name or modifiers of the member with this interface.

Since:
1.1
See Also:
Class, Field, Method, Constructor

Field Summary
static int DECLARED
          Represents all members, whether public, private, protected or package-protected, but only which are declared in this class.
static int PUBLIC
          Represents public members only, but includes all inherited members.
 
Method Summary
 Class getDeclaringClass()
          Gets the class that declared this member.
 int getModifiers()
          Gets the modifiers this member uses.
 String getName()
          Gets the simple name of this member.
 boolean isSynthetic()
          Return true if this member is synthetic, meaning that it was created by the compiler and does not appear in the user's source code.
 

Field Detail

DECLARED

static final int DECLARED
Represents all members, whether public, private, protected or package-protected, but only which are declared in this class. Used in SecurityManager.checkMemberAccess() to determine the type of members to access.

See Also:
SecurityManager.checkMemberAccess(Class, int), Constant Field Values

PUBLIC

static final int PUBLIC
Represents public members only, but includes all inherited members. Used in SecurityManager.checkMemberAccess() to determine the type of members to access.

See Also:
SecurityManager.checkMemberAccess(Class, int), Constant Field Values
Method Detail

getDeclaringClass

Class getDeclaringClass()
Gets the class that declared this member. This is not the class where this method was called, or even the class where this Member object came to life, but the class that declares the member this represents.

Returns:
the class that declared this member

getName

String getName()
Gets the simple name of this member. This will be a valid Java identifier, with no qualification.

Returns:
the name of this member

getModifiers

int getModifiers()
Gets the modifiers this member uses. Use the Modifier class to interpret the values.

Returns:
an integer representing the modifiers to this Member
See Also:
Modifier

isSynthetic

boolean isSynthetic()
Return true if this member is synthetic, meaning that it was created by the compiler and does not appear in the user's source code.

Returns:
true if the member is synthetic
Since:
1.5