Top Description Fields Methods
java.lang.reflect

public Interface Member

Known Direct Implementers
java.lang.invoke.MemberName, java.lang.reflect.Executable, java.lang.reflect.Field
Imports
java.util.Set

Member is an interface that reflects identifying information about a single member (a field or a method) or a constructor.
Author
Nakul Saraiya
Since
1.1
See Also
java.lang.Class, Field, Method, Constructor

Field Summary

Modifier and TypeField and Description
public static final int
DECLARED

Identifies the set of declared members of a class or interface.

public static final int
PUBLIC

Identifies the set of all public members of a class or interface, including inherited members.

Method Summary

Modifier and TypeMethod and Description
public default Set<AccessFlag>

Returns:

an unmodifiable set of the access flags for this member, possibly empty
accessFlags
()

Returns an unmodifiable set of the access flags for this member, possibly empty.

public Class<?>

Returns:

an object representing the declaring class of the underlying member
getDeclaringClass
()

Returns the Class object representing the class or interface that declares the member or constructor represented by this Member.

public int

Returns:

the Java language modifiers for the underlying member
getModifiers
()

Returns the Java language modifiers for the member or constructor represented by this Member, as an integer.

public String

Returns:

the simple name of the underlying member
getName
()

Returns the simple name of the underlying member or constructor represented by this Member.

public boolean

Returns:

true if and only if this member was introduced by the compiler.
isSynthetic
()

Returns true if this member was introduced by the compiler; returns false otherwise.

Field Detail

DECLAREDback to summary
public static final int DECLARED

Identifies the set of declared members of a class or interface. Inherited members are not included.

PUBLICback to summary
public static final int PUBLIC

Identifies the set of all public members of a class or interface, including inherited members.

Method Detail

accessFlagsback to summary
public default Set<AccessFlag> accessFlags()

Returns an unmodifiable set of the access flags for this member, possibly empty.

Implementation Specification

The default implementation throws UnsupportedOperationException.

Returns:Set<AccessFlag>

an unmodifiable set of the access flags for this member, possibly empty

Since
20
See Also
getModifiers()
getDeclaringClassback to summary
public Class<?> getDeclaringClass()

Returns the Class object representing the class or interface that declares the member or constructor represented by this Member.

Returns:Class<?>

an object representing the declaring class of the underlying member

getModifiersback to summary
public int getModifiers()

Returns the Java language modifiers for the member or constructor represented by this Member, as an integer. The Modifier class should be used to decode the modifiers in the integer.

Returns:int

the Java language modifiers for the underlying member

See Also
Modifier, accessFlags()
getNameback to summary
public String getName()

Returns the simple name of the underlying member or constructor represented by this Member.

Returns:String

the simple name of the underlying member

isSyntheticback to summary
public boolean isSynthetic()

Returns true if this member was introduced by the compiler; returns false otherwise.

Returns:boolean

true if and only if this member was introduced by the compiler.

Since
1.5
Java Language Specification
13.1 The Form of a Binary