Stay organized with collections
Save and categorize content based on your preferences.
Type
interface Type
Known Direct Subclasses
Class |
Instances of the class represent classes and interfaces in a running Java application.
|
GenericArrayType |
GenericArrayType represents an array type whose component type is either a parameterized type or a type variable.
|
ParameterizedType |
ParameterizedType represents a parameterized type such as Collection<String>.
|
TypeVariable |
TypeVariable is the common superinterface for type variables of kinds.
|
WildcardType |
WildcardType represents a wildcard type expression, such as ? , ? extends Number , or ? super Integer .
|
|
Type is the common superinterface for all types in the Java programming language. These include raw types, parameterized types, array types, type variables and primitive types.
Summary
Public methods |
open String |
Returns a string describing this type, including information about any type parameters.
|
Public methods
getTypeName
open fun getTypeName(): String
Returns a string describing this type, including information about any type parameters.
Return |
String |
a string describing this type |
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,["# Type\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nType\n====\n\n```\ninterface Type\n```\n\n|-----------------------------|\n| [java.lang.reflect.Type](#) |\n\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Known Direct Subclasses [Class](../Class.html#), [GenericArrayType](/reference/kotlin/java/lang/reflect/GenericArrayType), [ParameterizedType](/reference/kotlin/java/lang/reflect/ParameterizedType), [TypeVariable](/reference/kotlin/java/lang/reflect/TypeVariable), [WildcardType](/reference/kotlin/java/lang/reflect/WildcardType) |----------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------| | [Class](../Class.html#) | Instances of the class represent classes and interfaces in a running Java application. | | [GenericArrayType](/reference/kotlin/java/lang/reflect/GenericArrayType) | `GenericArrayType` represents an array type whose component type is either a parameterized type or a type variable. | | [ParameterizedType](/reference/kotlin/java/lang/reflect/ParameterizedType) | ParameterizedType represents a parameterized type such as Collection\\\u003cString\\\u003e. | | [TypeVariable](/reference/kotlin/java/lang/reflect/TypeVariable) | TypeVariable is the common superinterface for type variables of kinds. | | [WildcardType](/reference/kotlin/java/lang/reflect/WildcardType) | WildcardType represents a wildcard type expression, such as `?`, `? extends Number`, or `? super Integer`. | |\n\nType is the common superinterface for all types in the Java programming language. These include raw types, parameterized types, array types, type variables and primitive types.\n\nSummary\n-------\n\n| Public methods ||\n|---------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------|\n| open [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | [getTypeName](#getTypeName())`()` Returns a string describing this type, including information about any type parameters. |\n\nPublic methods\n--------------\n\n### getTypeName\n\nAdded in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun getTypeName(): String\n```\n\nReturns a string describing this type, including information about any type parameters.\n\n| Return ||\n|----------------------------------------------------------------------------------|-------------------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) | a string describing this type |"]]