Added in API level 1

Member

interface Member
java.lang.reflect.Member

Member is an interface that reflects identifying information about a single member (a field or a method) or a constructor.

Summary

Constants
static Int

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

static Int

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

Public methods
abstract Class<*>

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

abstract Int

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

abstract String

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

abstract Boolean

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

Constants

DECLARED

Added in API level 1
static val DECLARED: Int

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

Value: 1

PUBLIC

Added in API level 1
static val PUBLIC: Int

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

Value: 0

Public methods

getDeclaringClass

Added in API level 1
abstract fun getDeclaringClass(): Class<*>

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

Return
Class<*> an object representing the declaring class of the underlying member

getModifiers

Added in API level 1
abstract fun getModifiers(): Int

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.

Return
Int the Java language modifiers for the underlying member

getName

Added in API level 1
abstract fun getName(): String

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

Return
String the simple name of the underlying member

isSynthetic

Added in API level 1
abstract fun isSynthetic(): Boolean

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

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