KAnnotationMetadata

Some Annotation metadata.

Author

ForteScarlet

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val annotationType: KClass<A>

Get annotation type, Just like Annotation::class.

Link copied to clipboard

The Deprecated.level if isDeprecated == true or empty.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract val isDeprecated: Boolean

Check if Deprecated is marked.

Link copied to clipboard

Check if MustBeDocumented is marked.

Link copied to clipboard
abstract val isRepeatable: Boolean

Is a repeatable annotation.

Link copied to clipboard

Get all properties with their default value (if it exists).

Link copied to clipboard
abstract val propertyNames: Set<String>

Get current annotation type 's all property name.

Link copied to clipboard
abstract val propertyTypes: Map<String, KType>

Get current annotation type 's all properties with their type.

Link copied to clipboard

Get RetentionPolicy of this annotation.

Link copied to clipboard

Get Set<AnnotationTarget> of this annotation.

Functions

Link copied to clipboard
abstract operator fun contains(name: String): Boolean

Determine whether a certain property exists.

abstract operator fun contains(type: AnnotationTarget): Boolean

Detect whether there is a target type.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
abstract fun getAnnotationValue(property: String, annotation: @UnsafeVariance A): Any?

Get property value of specified annotation instance with property name.

Link copied to clipboard
abstract fun getProperties(annotation: @UnsafeVariance A): Map<String, Any>

Get properties of specified annotation instance.

Link copied to clipboard
abstract fun getPropertyDefaultValue(property: String): Any?

Get default value of property of the specified property name.

Link copied to clipboard
abstract fun getPropertyNamingMap(targetType: KClass<out Annotation>, targetPropertyName: String): String?

Get the property mapping for target type.

Link copied to clipboard
abstract fun getPropertyNamingMaps(targetType: KClass<out Annotation>): Map<String, String>

Get the property mappings for target type. The key is targetType 's property name, value is current type's property.

Link copied to clipboard
abstract fun getPropertyType(property: String): KType?

Get the type of the property of the specified property name.