@@ -5619,13 +5619,15 @@ class LabelFragmentImpl extends FragmentImpl implements LabelFragment {
5619
5619
}
5620
5620
5621
5621
/// A concrete implementation of [LibraryElement] .
5622
- class LibraryElementImpl extends FragmentImpl
5623
- with _HasLibraryMixin
5624
- implements LibraryElement {
5625
- /// The analysis context in which this library is defined.
5626
- @override
5622
+ class LibraryElementImpl extends ElementImpl2 implements LibraryElement {
5627
5623
final AnalysisContext context;
5628
5624
5625
+ @override
5626
+ Reference ? reference;
5627
+
5628
+ @override
5629
+ String ? documentationComment;
5630
+
5629
5631
@override
5630
5632
AnalysisSessionImpl session;
5631
5633
@@ -5637,6 +5639,8 @@ class LibraryElementImpl extends FragmentImpl
5637
5639
5638
5640
bool hasTypeProviderSystemSet = false ;
5639
5641
5642
+ List <ElementAnnotationImpl > _annotations = [];
5643
+
5640
5644
@override
5641
5645
late TypeProviderImpl typeProvider;
5642
5646
@@ -5661,9 +5665,18 @@ class LibraryElementImpl extends FragmentImpl
5661
5665
/// for this library.
5662
5666
late final LoadLibraryFunctionProvider loadLibraryProvider;
5663
5667
5664
- @override
5668
+ // TODO(scheglov): replace with `LibraryName` or something.
5669
+ String name;
5670
+
5671
+ // TODO(scheglov): replace with `LibraryName` or something.
5672
+ int nameOffset;
5673
+
5674
+ // TODO(scheglov): replace with `LibraryName` or something.
5665
5675
int nameLength;
5666
5676
5677
+ @override
5678
+ bool isSynthetic = false ;
5679
+
5667
5680
@override
5668
5681
List <ClassElementImpl2 > classes = [];
5669
5682
@@ -5713,12 +5726,20 @@ class LibraryElementImpl extends FragmentImpl
5713
5726
LibraryElementImpl (
5714
5727
this .context,
5715
5728
this .session,
5716
- String name,
5717
- int offset ,
5729
+ this . name,
5730
+ this .nameOffset ,
5718
5731
this .nameLength,
5719
5732
this .featureSet,
5720
- ) : linkedData = null ,
5721
- super (name, offset);
5733
+ );
5734
+
5735
+ List <ElementAnnotationImpl > get annotations {
5736
+ linkedData? .read (this );
5737
+ return _annotations;
5738
+ }
5739
+
5740
+ set annotations (List <ElementAnnotationImpl > value) {
5741
+ _annotations = value;
5742
+ }
5722
5743
5723
5744
@override
5724
5745
LibraryElementImpl get baseElement => this ;
@@ -5746,14 +5767,6 @@ class LibraryElementImpl extends FragmentImpl
5746
5767
@override
5747
5768
Null get enclosingElement2 => enclosingElement;
5748
5769
5749
- @override
5750
- Null get enclosingElement3 => null ;
5751
-
5752
- @override
5753
- LibraryFragmentImpl get enclosingUnit {
5754
- return definingCompilationUnit;
5755
- }
5756
-
5757
5770
@override
5758
5771
TopLevelFunctionElementImpl ? get entryPoint2 {
5759
5772
linkedData? .read (this );
@@ -5876,9 +5889,6 @@ class LibraryElementImpl extends FragmentImpl
5876
5889
_languageVersion = languageVersion;
5877
5890
}
5878
5891
5879
- @override
5880
- LibraryElementImpl get library => this ;
5881
-
5882
5892
@override
5883
5893
LibraryElementImpl get library2 => this ;
5884
5894
@@ -5895,14 +5905,10 @@ class LibraryElementImpl extends FragmentImpl
5895
5905
String ? get lookupName => null ;
5896
5906
5897
5907
@override
5898
- List <ElementAnnotationImpl > get metadata {
5899
- linkedData? .read (this );
5900
- return super .metadata;
5908
+ MetadataImpl get metadata2 {
5909
+ return MetadataImpl (annotations);
5901
5910
}
5902
5911
5903
- @override
5904
- String get name => super .name! ;
5905
-
5906
5912
@override
5907
5913
String ? get name3 => name;
5908
5914
@@ -5937,7 +5943,7 @@ class LibraryElementImpl extends FragmentImpl
5937
5943
return SinceSdkVersionComputer ().compute (this );
5938
5944
}
5939
5945
5940
- @override
5946
+ // TODO(scheglov): replace with `firstFragment.source`
5941
5947
Source get source {
5942
5948
return definingCompilationUnit.source;
5943
5949
}
0 commit comments