Stay organized with collections
Save and categorize content based on your preferences.
TypeDescriptor
interface TypeDescriptor
Known Indirect Subclasses
Class |
Instances of the class represent classes and interfaces in a running Java application.
|
MethodType |
A method type represents the arguments and return type accepted and returned by a method handle, or the arguments and return type passed and expected by a method handle caller.
|
|
An entity that has a type descriptor.
Summary
Nested classes |
abstract |
An entity that has a field type descriptor.
|
abstract |
An entity that has a method type descriptor Method descriptors conforming to JVMS {@jvms 4.
|
Public methods |
abstract String! |
Returns the descriptor string for this TypeDescriptor object.
|
Public methods
descriptorString
abstract fun descriptorString(): String!
Returns the descriptor string for this TypeDescriptor
object. If this TypeDescriptor
object can be described in nominal form, then this method returns a type descriptor as specified in JVMS {@jvms 4.3}. The result descriptor string can be used to produce a java.lang.constant.ConstantDesc nominal descriptor
. Otherwise, the result string is not a type descriptor. No java.lang.constant.ConstantDesc nominal descriptor
can be produced from the result string.
Return |
String! |
the descriptor string for this TypeDescriptor object |
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.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# TypeDescriptor\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nTypeDescriptor\n==============\n\n```\ninterface TypeDescriptor\n```\n\n|--------------------------------------|\n| [java.lang.invoke.TypeDescriptor](#) |\n\n|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known Direct Subclasses [TypeDescriptor.OfField](/reference/kotlin/java/lang/invoke/TypeDescriptor.OfField), [TypeDescriptor.OfMethod](/reference/kotlin/java/lang/invoke/TypeDescriptor.OfMethod) |---------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------| | [TypeDescriptor.OfField](/reference/kotlin/java/lang/invoke/TypeDescriptor.OfField) | An entity that has a field type descriptor. | | [TypeDescriptor.OfMethod](/reference/kotlin/java/lang/invoke/TypeDescriptor.OfMethod) | An entity that has a method type descriptor Method descriptors conforming to JVMS {@jvms 4. | |\n\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known Indirect Subclasses [Class](../Class.html#), [MethodType](/reference/kotlin/java/lang/invoke/MethodType) |-------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Class](../Class.html#) | Instances of the class represent classes and interfaces in a running Java application. | | [MethodType](/reference/kotlin/java/lang/invoke/MethodType) | A method type represents the arguments and return type accepted and returned by a method handle, or the arguments and return type passed and expected by a method handle caller. | |\n\nAn entity that has a type descriptor.\n\nSummary\n-------\n\n| Nested classes ||\n|----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract | [OfField](/reference/kotlin/java/lang/invoke/TypeDescriptor.OfField) An entity that has a field type descriptor. |\n| abstract | [OfMethod](/reference/kotlin/java/lang/invoke/TypeDescriptor.OfMethod) An entity that has a method type descriptor Method descriptors conforming to JVMS {@jvms 4. |\n\n| Public methods ||\n|--------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------|\n| abstract [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | [descriptorString](#descriptorString())`()` Returns the descriptor string for this `TypeDescriptor` object. |\n\nPublic methods\n--------------\n\n### descriptorString\n\nAdded in [API level 34](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nabstract fun descriptorString(): String!\n```\n\nReturns the descriptor string for this `TypeDescriptor` object. If this `TypeDescriptor` object can be described in nominal form, then this method returns a type descriptor as specified in JVMS {@jvms 4.3}. The result descriptor string can be used to produce a `java.lang.constant.ConstantDesc nominal descriptor`. Otherwise, the result string is not a type descriptor. No `java.lang.constant.ConstantDesc nominal descriptor` can be produced from the result string.\n\n| Return ||\n|-----------------------------------------------------------------------------------|--------------------------------------------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | the descriptor string for this `TypeDescriptor` object |"]]