AnnotationImpl constructor
AnnotationImpl({
- required Token atSign,
- required IdentifierImpl name,
- required TypeArgumentListImpl? typeArguments,
- required Token? period,
- required SimpleIdentifierImpl? constructorName,
- required ArgumentListImpl? arguments,
Initialize a newly created annotation. Both the period and the
constructorName
can be null
if the annotation is not referencing a
named constructor. The arguments
can be null
if the annotation is not
referencing a constructor.
Note that type arguments are only valid if Feature.generic_metadata
is
enabled.
Implementation
AnnotationImpl({
required this.atSign,
required IdentifierImpl name,
required TypeArgumentListImpl? typeArguments,
required this.period,
required SimpleIdentifierImpl? constructorName,
required ArgumentListImpl? arguments,
}) : _name = name,
_typeArguments = typeArguments,
_constructorName = constructorName,
_arguments = arguments {
_becomeParentOf(_name);
_becomeParentOf(_typeArguments);
_becomeParentOf(_constructorName);
_becomeParentOf(_arguments);
}