Generic constructor
Creates a Generic annotation instance.
Parameters:
_type
: The base generic type (e.g.,List
forList<T>
)_uri
: Optional source URI for better debugging
Throws:
- InvalidArgumentException if
_type
represents a non-generic type
Example:
@Generic(DataPipe, 'dart:async')
class DataPipe<T> {
Stream<T> get stream => _controller.stream;
}
Implementation
const Generic(this._type, [this._uri]);