VitalHasInfo

interface VitalHasInfo

Should be used for classes that support an info annotation to provide metadata. To allow for multiple info annotations along the hierarchy path, this interface exposes a map of all registered info annotations.

To retrieve a single info annotation.

final var myInfoAnnotation = getInfo(MyInfoAnnotation.class)

Inheritors

Properties

Link copied to clipboard
abstract val info: MutableMap<out Class<out Annotation>, out Annotation>

All info metadata for this class, indexed by their unique Class. Can be initialized with VitalCoreModule.getRequiredAnnotation or VitalCoreModule.getRequiredAnnotations.

Functions

Link copied to clipboard
open fun <T : Annotation> getInfo(type: Class<T>): T

Gets the info annotation for the given type. If no info annotation was found, throws RuntimeException.