# KeyValueOf<K, V> class final

KeyValueOf Annotation

A reflectable annotation used to declare a key-value type relationship, such as for maps, configuration entries, or type-safe dictionaries.

# Purpose

- Provides explicit metadata about both key and value types.
- Supports optional package scoping for each type.
- Used by dependency resolution or serialization frameworks where generic type information is erased at runtime.

# Behavior

- Stores optional kPkg and vPkg (package names for key and value).
- Exposes getKey and getValue to resolve Class<K> and Class<V>.

# Example

    @KeyValueOf("package:example/test.dart.keys", "package:example/test.dart.values")
    final KeyValueOf<String, User> userMapping = KeyValueOf();

    final keyClass = userMapping.getKey();
    final valueClass = userMapping.getValue();
    print(keyClass.getQualifiedName());   // package:example/test.dart.keys.String
    print(valueClass.getQualifiedName()); // package:example/test.dart.values.User

# Notes

- Provides strong typing for frameworks handling generic maps.
- Useful for reflection-based object factories and parsers.

Inheritance
  - Object
  - ReflectableAnnotation
  - KeyValueOf
Annotations
  - @Generic(KeyValueOf)
  - @Target({TargetKind.field})

## Constructors

KeyValueOf.new([String? kPkg, String? vPkg])
  KeyValueOf Annotation
  const

## Properties

annotationType → Type
  Returns the annotation _type of this annotation.
  no setter override
hashCode → int
  Returns a hash code consistent with equality definition.
  no setter inherited
kPkg → String?
  Optional package name for the key type.
  final
runtimeType → Type
  A representation of the runtime type of the object.
  no setter inherited
vPkg → String?
  Optional package name for the value type.
  final

## Methods

equals(Object other) → bool
  Checks whether the given object is logically equivalent to this annotation.
  inherited
getKey() → Class<K>
  Resolves the key type into a Class<K> representation.
getValue() → Class<V>
  Resolves the value type into a Class<V> representation.
noSuchMethod(Invocation invocation) → dynamic
  Invoked when a nonexistent method or property is accessed.
  inherited
toString() → String
  Returns a string representation of this annotation.
  inherited

## Operators

operator ==(Object other) → bool
  Checks if this annotation is equal to another object.
  inherited