@@ -46,13 +46,15 @@ class _SpecialClassDefinition {
46
46
/// If true, require this element to exist in the packageGraph when
47
47
/// calling the [SpecialClasses] constructor.
48
48
final bool required ;
49
- _SpecialClassDefinition (
49
+
50
+ const _SpecialClassDefinition (
50
51
this .specialClass, this .name, this .libraryName, this .specialFileUri,
51
52
{this .required = true , this .packageName = 'Dart' });
52
53
53
- /// Get the filename for the Dart Library where this [specialClass] is
54
- /// declared.
55
- String getSpecialFilename (DartSdk sdk) =>
54
+ /// Get the filename for the Dart Library where this [ModelElement]
55
+ /// is declared, or `null` if its URI does not denote a library in
56
+ /// the specified SDK.
57
+ String /*?*/ getSpecialFilename (DartSdk sdk) =>
56
58
sdk.mapDartUri (specialFileUri)? .fullName;
57
59
58
60
bool matchesClass (Class modelClass) {
@@ -65,7 +67,7 @@ class _SpecialClassDefinition {
65
67
/// All special classes we need to find here, indexed by class name.
66
68
/// The index is a shortcut to reduce processing time for determining if
67
69
/// a class might be "special".
68
- final Map <String , _SpecialClassDefinition > _specialClassDefinitions = {
70
+ const Map <String , _SpecialClassDefinition > _specialClassDefinitions = {
69
71
'Object' : _SpecialClassDefinition (
70
72
SpecialClass .object, 'Object' , 'dart.core' , 'dart:core' ),
71
73
'Interceptor' : _SpecialClassDefinition (SpecialClass .interceptor,
0 commit comments