# ObjectHolder<T> class

A generic container that holds an object along with optional metadata such as its package name and qualified name.

The ObjectHolder is useful for cases where you want to associate an object with extra metadata that describes where it came from (e.g., reflection, classpath scanning, or dependency resolution).

- `T` is the type of object being held.
- `_packageName` represents the Dart package in which the object resides.
- `_qualifiedName` represents the fully qualified class or type name.

### Example

    void main() {
      final holder = ObjectHolder<String>(
        'MyClass',
        packageName: 'my_app',
        qualifiedName: 'package:my_app/my_app.dart.MyClass',
      );

      print('Value: ${holder.getValue()}');
      print('Package: ${holder.getPackageName()}');
      print('Qualified name: ${holder.getQualifiedName()}');
    }

Constraints:

- Either `packageName` or `qualifiedName` must be provided.
- If provided, neither may be an empty string.

Mixed-in types
  - EqualsAndHashCode
  - ToString
Annotations
  - @Generic(ObjectHolder)

## Constructors

ObjectHolder.new(T _value, {String? packageName, String? qualifiedName})
  A generic container that holds an object along with optional metadata such as its package name and qualified name.

## Properties

hashCode → int
  The hash code for this object.
  no setter inherited
runtimeType → Type
  A representation of the runtime type of the object.
  no setter inherited

## Methods

equalizedProperties() → List<Object?>
  Mixin-style contract for value-based equality, `hashCode`, and `toString`.
  override
getPackageName() → String?
  Returns the package name associated with the held object, or `null` if not provided.
getQualifiedName() → String?
  Returns the fully qualified name associated with the held object, or `null` if not provided.
getType() → Class?
  Returns the type of the held value.
getValue() → T
  Returns the underlying held value of type `T`.
noSuchMethod(Invocation invocation) → dynamic
  Invoked when a nonexistent method or property is accessed.
  inherited
toString() → String
  A string representation of this object.
  inherited
toStringOptions() → ToStringOptions
  override

## Operators

operator ==(Object other) → bool
  The equality operator.
  inherited