Stay organized with collections
Save and categorize content based on your preferences.
IncompleteAnnotationException
open class IncompleteAnnotationException : RuntimeException
Thrown to indicate that a program has attempted to access an element of an annotation interface that was added to the annotation interface definition after the annotation was compiled (or serialized). This exception will not be thrown if the new element has a default value. This exception can be thrown by the .
Summary
Public constructors |
Constructs an IncompleteAnnotationException to indicate that the named element was missing from the specified annotation interface.
|
Public methods |
open Class<out Annotation!>! |
Returns the Class object for the annotation interface with the missing element.
|
open String! |
Returns the name of the missing element.
|
Public constructors
IncompleteAnnotationException
IncompleteAnnotationException(
annotationType: Class<out Annotation!>!,
elementName: String!)
Constructs an IncompleteAnnotationException to indicate that the named element was missing from the specified annotation interface.
Parameters |
annotationType |
Class<out Annotation!>!: the Class object for the annotation interface |
elementName |
String!: the name of the missing element |
Exceptions |
java.lang.NullPointerException |
if either parameter is null |
Public methods
annotationType
open fun annotationType(): Class<out Annotation!>!
Returns the Class object for the annotation interface with the missing element.
Return |
Class<out Annotation!>! |
the Class object for the annotation interface with the missing element |
elementName
open fun elementName(): String!
Returns the name of the missing element.
Return |
String! |
the name of the missing element |
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,["# IncompleteAnnotationException\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels)\n\nIncompleteAnnotationException\n=============================\n\n```\nopen class IncompleteAnnotationException : RuntimeException\n```\n\n|---|---|---|---|---------------------------------------------------------|\n| [kotlin.Any](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html) |||||\n| ↳ | [kotlin.Throwable](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-throwable/index.html) ||||\n| | ↳ | [java.lang.Exception](../Exception.html#) |||\n| | | ↳ | [java.lang.RuntimeException](../RuntimeException.html#) ||\n| | | | ↳ | [java.lang.annotation.IncompleteAnnotationException](#) |\n\nThrown to indicate that a program has attempted to access an element of an annotation interface that was added to the annotation interface definition after the annotation was compiled (or serialized). This exception will not be thrown if the new element has a default value. This exception can be thrown by the .\n\nSummary\n-------\n\n| Public constructors ||\n|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| [IncompleteAnnotationException](#IncompleteAnnotationException(java.lang.Class,%20kotlin.String))`(`annotationType:` `[Class](../Class.html#)\u003cout` `[Annotation](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-annotation/index.html)!\u003e!`, `elementName:` `[String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!`)` Constructs an IncompleteAnnotationException to indicate that the named element was missing from the specified annotation interface. |\n\n| Public methods ||\n|--------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------|\n| open [Class](../Class.html#)\\\u003cout [Annotation](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-annotation/index.html)!\\\u003e! | [annotationType](#annotationType())`()` Returns the Class object for the annotation interface with the missing element. |\n| open [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | [elementName](#elementName())`()` Returns the name of the missing element. |\n\nPublic constructors\n-------------------\n\n### IncompleteAnnotationException\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nIncompleteAnnotationException(\n annotationType: Class\u003cout Annotation!\u003e!, \n elementName: String!)\n```\n\nConstructs an IncompleteAnnotationException to indicate that the named element was missing from the specified annotation interface.\n\n| Parameters ||\n|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `annotationType` | [Class](../Class.html#)\\\u003cout [Annotation](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-annotation/index.html)!\\\u003e!: the Class object for the annotation interface |\n| `elementName` | [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)!: the name of the missing element |\n\n| Exceptions ||\n|----------------------------------|-------------------------------|\n| `java.lang.NullPointerException` | if either parameter is `null` |\n\nPublic methods\n--------------\n\n### annotationType\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun annotationType(): Class\u003cout Annotation!\u003e!\n```\n\nReturns the Class object for the annotation interface with the missing element.\n\n| Return ||\n|---------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------|\n| [Class](../Class.html#)\u003cout` `[Annotation](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-annotation/index.html)!\u003e! | the Class object for the annotation interface with the missing element |\n\n### elementName\n\nAdded in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels) \n\n```\nopen fun elementName(): String!\n```\n\nReturns the name of the missing element.\n\n| Return ||\n|-----------------------------------------------------------------------------------|---------------------------------|\n| [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)! | the name of the missing element |"]]