Stay organized with collections
Save and categorize content based on your preferences.
Member
interface Member
Known Direct Subclasses
Executable |
A shared superclass for the common functionality of Method and Constructor .
|
Field |
A Field provides information about, and dynamic access to, a single field of a class or an interface.
|
|
Known Indirect Subclasses
Constructor |
Constructor provides information about, and access to, a single constructor for a class.
|
Method |
A Method provides information about, and access to, a single method on a class or interface.
|
|
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
static val DECLARED: Int
Identifies the set of declared members of a class or interface. Inherited members are not included.
Value: 1
PUBLIC
static val PUBLIC: Int
Identifies the set of all public members of a class or interface, including inherited members.
Value: 0
Public methods
getDeclaringClass
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
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
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
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. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-02-10 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-02-10 UTC."],[],[],null,["# Member\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nMember\n======\n\n```\ninterface Member\n```\n\n|-------------------------------|\n| [java.lang.reflect.Member](#) |\n\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known Direct Subclasses [Executable](/reference/kotlin/java/lang/reflect/Executable), [Field](/reference/kotlin/java/lang/reflect/Field) |--------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Executable](/reference/kotlin/java/lang/reflect/Executable) | A shared superclass for the common functionality of [Method](/reference/kotlin/java/lang/reflect/Method) and [Constructor](/reference/kotlin/java/lang/reflect/Constructor). | | [Field](/reference/kotlin/java/lang/reflect/Field) | A `Field` provides information about, and dynamic access to, a single field of a class or an interface. | |\n\n|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known Indirect Subclasses [Constructor](/reference/kotlin/java/lang/reflect/Constructor), [Method](/reference/kotlin/java/lang/reflect/Method) |----------------------------------------------------------------|------------------------------------------------------------------------------------------------| | [Constructor](/reference/kotlin/java/lang/reflect/Constructor) | `Constructor` provides information about, and access to, a single constructor for a class. | | [Method](/reference/kotlin/java/lang/reflect/Method) | A `Method` provides information about, and access to, a single method on a class or interface. | |\n\nMember is an interface that reflects identifying information about a single member (a field or a method) or a constructor.\n\nSummary\n-------\n\n| Constants ||\n|-----------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------|\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [DECLARED](#DECLARED:kotlin.Int) Identifies the set of declared members of a class or interface. |\n| static [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [PUBLIC](#PUBLIC:kotlin.Int) Identifies the set of all public members of a class or interface, including inherited members. |\n\n| Public methods ||\n|---------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract [Class](../Class.html#)\\\u003c\\*\\\u003e | [getDeclaringClass](#getDeclaringClass())`()` Returns the Class object representing the class or interface that declares the member or constructor represented by this Member. |\n| abstract [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | [getModifiers](#getModifiers())`()` Returns the Java language modifiers for the member or constructor represented by this Member, as an integer. |\n| abstract [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [getName](#getName())`()` Returns the simple name of the underlying member or constructor represented by this Member. |\n| abstract [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | [isSynthetic](#isSynthetic())`()` Returns `true` if this member was introduced by the compiler; returns `false` otherwise. |\n\nConstants\n---------\n\n### DECLARED\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val DECLARED: Int\n```\n\nIdentifies the set of declared members of a class or interface. Inherited members are not included. \n\n Value: 1\n\n### PUBLIC\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nstatic val PUBLIC: Int\n```\n\nIdentifies the set of all public members of a class or interface, including inherited members. \n\n Value: 0\n\nPublic methods\n--------------\n\n### getDeclaringClass\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun getDeclaringClass(): Class\u003c*\u003e\n```\n\nReturns the Class object representing the class or interface that declares the member or constructor represented by this Member.\n\n| Return ||\n|----------------------------|---------------------------------------------------------------------|\n| [Class](../Class.html#)\u003c*\u003e | an object representing the declaring class of the underlying member |\n\n### getModifiers\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun getModifiers(): Int\n```\n\nReturns 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.\n\n| Return ||\n|----------------------------------------------------------------------------|-------------------------------------------------------|\n| [Int](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html) | the Java language modifiers for the underlying member |\n\n**See Also**\n\n- [java.lang.reflect.Modifier](/reference/kotlin/java/lang/reflect/Modifier) \n\n### getName\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun getName(): String\n```\n\nReturns the simple name of the underlying member or constructor represented by this Member.\n\n| Return ||\n|----------------------------------------------------------------------------------|------------------------------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | the simple name of the underlying member |\n\n### isSynthetic\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun isSynthetic(): Boolean\n```\n\nReturns `true` if this member was introduced by the compiler; returns `false` otherwise.\n\n| Return ||\n|------------------------------------------------------------------------------------|-----------------------------------------------------------------|\n| [Boolean](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html) | true if and only if this member was introduced by the compiler. |"]]