@@ -2340,85 +2340,12 @@ abstract class ExecutableElementImpl extends FunctionTypedElementImpl
23402340 }
23412341}
23422342
2343- /// Common base class for all analyzer-internal classes that implement
2344- /// `ExecutableElement` .
2345- abstract class ExecutableElementOrMember implements FragmentOrMember {
2346- @override
2347- ExecutableElementOrMember get declaration;
2348-
2349- @override
2350- String get displayName;
2351-
2352- /// Whether the executable element did not have an explicit return type
2353- /// specified for it in the original source.
2354- bool get hasImplicitReturnType;
2355-
2356- /// Whether the executable element is abstract.
2357- ///
2358- /// Executable elements are abstract if they are not external, and have no
2359- /// body.
2360- bool get isAbstract;
2361-
2362- /// Whether the executable element has body marked as being asynchronous.
2363- bool get isAsynchronous;
2364-
2365- /// Whether the element is an augmentation.
2366- ///
2367- /// If `true` , declaration has the explicit `augment` modifier.
2368- bool get isAugmentation;
2369-
2370- /// Whether the executable element is an extension type member.
2371- bool get isExtensionTypeMember;
2372-
2373- /// Whether the executable element is external.
2374- ///
2375- /// Executable elements are external if they are explicitly marked as such
2376- /// using the 'external' keyword.
2377- bool get isExternal;
2378-
2379- /// Whether the executable element has a body marked as being a generator.
2380- bool get isGenerator;
2381-
2382- /// Whether the executable element is an operator.
2383- ///
2384- /// The test may be based on the name of the executable element, in which
2385- /// case the result will be correct when the name is legal.
2386- bool get isOperator;
2387-
2388- /// Whether the element is a static element.
2389- ///
2390- /// A static element is an element that is not associated with a particular
2391- /// instance, but rather with an entire library or class.
2392- bool get isStatic;
2393-
2394- /// Whether the executable element has a body marked as being synchronous.
2395- bool get isSynchronous;
2396-
2397- /// The parameters defined by this executable element.
2398- List <ParameterElementMixin > get parameters;
2399-
2400- /// The return type defined by this element.
2401- TypeImpl get returnType;
2402-
2403- @override
2404- Source get source;
2405-
2406- /// The type defined by this element.
2407- FunctionTypeImpl get type;
2408-
2409- /// The type parameters declared by this element directly.
2410- ///
2411- /// This does not include type parameters that are declared by any enclosing
2412- /// elements.
2413- List <TypeParameterFragmentImpl > get typeParameters;
2414- }
2415-
24162343abstract class ExecutableFragmentImpl extends _ExistingFragmentImpl
24172344 with
24182345 AugmentableFragment ,
24192346 DeferredResolutionReadingMixin ,
24202347 TypeParameterizedFragmentMixin
2421- implements ExecutableElementOrMember , ExecutableFragment {
2348+ implements ExecutableFragment {
24222349 /// A list containing all of the parameters defined by this executable
24232350 /// element.
24242351 List <FormalParameterFragmentImpl > _parameters = const [];
@@ -2461,7 +2388,8 @@ abstract class ExecutableFragmentImpl extends _ExistingFragmentImpl
24612388 setModifier (Modifier .NO_ENCLOSING_TYPE_PARAMETER_REFERENCE , ! value);
24622389 }
24632390
2464- @override
2391+ /// Whether the executable element did not have an explicit return type
2392+ /// specified for it in the original source.
24652393 bool get hasImplicitReturnType {
24662394 return hasModifier (Modifier .IMPLICIT_TYPE );
24672395 }
@@ -2479,7 +2407,10 @@ abstract class ExecutableFragmentImpl extends _ExistingFragmentImpl
24792407 setModifier (Modifier .INVOKES_SUPER_SELF , value);
24802408 }
24812409
2482- @override
2410+ /// Whether the executable element is abstract.
2411+ ///
2412+ /// Executable elements are abstract if they are not external, and have no
2413+ /// body.
24832414 bool get isAbstract {
24842415 return hasModifier (Modifier .ABSTRACT );
24852416 }
@@ -2494,7 +2425,7 @@ abstract class ExecutableFragmentImpl extends _ExistingFragmentImpl
24942425 setModifier (Modifier .ASYNCHRONOUS , isAsynchronous);
24952426 }
24962427
2497- @override
2428+ /// Whether the executable element is an extension type member.
24982429 bool get isExtensionTypeMember {
24992430 return hasModifier (Modifier .EXTENSION_TYPE_MEMBER );
25002431 }
@@ -2503,7 +2434,10 @@ abstract class ExecutableFragmentImpl extends _ExistingFragmentImpl
25032434 setModifier (Modifier .EXTENSION_TYPE_MEMBER , value);
25042435 }
25052436
2506- @override
2437+ /// Whether the executable element is external.
2438+ ///
2439+ /// Executable elements are external if they are explicitly marked as such
2440+ /// using the 'external' keyword.
25072441 bool get isExternal {
25082442 return hasModifier (Modifier .EXTERNAL );
25092443 }
@@ -2523,10 +2457,16 @@ abstract class ExecutableFragmentImpl extends _ExistingFragmentImpl
25232457 setModifier (Modifier .GENERATOR , isGenerator);
25242458 }
25252459
2526- @override
2460+ /// Whether the executable element is an operator.
2461+ ///
2462+ /// The test may be based on the name of the executable element, in which
2463+ /// case the result will be correct when the name is legal.
25272464 bool get isOperator => false ;
25282465
2529- @override
2466+ /// Whether the element is a static element.
2467+ ///
2468+ /// A static element is an element that is not associated with a particular
2469+ /// instance, but rather with an entire library or class.
25302470 bool get isStatic {
25312471 return hasModifier (Modifier .STATIC );
25322472 }
@@ -2547,7 +2487,7 @@ abstract class ExecutableFragmentImpl extends _ExistingFragmentImpl
25472487 @override
25482488 int get offset => _nameOffset;
25492489
2550- @override
2490+ /// The formal parameters defined by this executable fragment.
25512491 List <FormalParameterFragmentImpl > get parameters {
25522492 _ensureReadResolution ();
25532493 return _parameters;
@@ -2566,7 +2506,7 @@ abstract class ExecutableFragmentImpl extends _ExistingFragmentImpl
25662506 return _parameters;
25672507 }
25682508
2569- @override
2509+ /// The return type specified by this fragment.
25702510 TypeImpl get returnType {
25712511 _ensureReadResolution ();
25722512
@@ -2596,7 +2536,7 @@ abstract class ExecutableFragmentImpl extends _ExistingFragmentImpl
25962536 _type = null ;
25972537 }
25982538
2599- @override
2539+ /// The type defined by this element.
26002540 FunctionTypeImpl get type {
26012541 if (_type != null ) return _type! ;
26022542
@@ -2614,7 +2554,7 @@ abstract class ExecutableFragmentImpl extends _ExistingFragmentImpl
26142554
26152555 @override
26162556 void appendTo (ElementDisplayStringBuilder builder) {
2617- builder.writeExecutableElement (this , displayName);
2557+ builder.writeExecutableFragment (this , displayName);
26182558 }
26192559}
26202560
@@ -4119,7 +4059,7 @@ abstract class FragmentOrMember implements Fragment {
41194059}
41204060
41214061sealed class FunctionFragmentImpl extends ExecutableFragmentImpl
4122- implements FunctionTypedFragmentImpl , ExecutableElementOrMember {
4062+ implements FunctionTypedFragmentImpl {
41234063 @override
41244064 final String ? name2;
41254065
@@ -4506,7 +4446,7 @@ class GetterFragmentImpl extends PropertyAccessorFragmentImpl
45064446
45074447 @override
45084448 void appendTo (ElementDisplayStringBuilder builder) {
4509- builder.writeExecutableElement (this , 'get $displayName ' );
4449+ builder.writeExecutableFragment (this , 'get $displayName ' );
45104450 }
45114451}
45124452
@@ -9284,7 +9224,7 @@ class SetterFragmentImpl extends PropertyAccessorFragmentImpl
92849224
92859225 @override
92869226 void appendTo (ElementDisplayStringBuilder builder) {
9287- builder.writeExecutableElement (this , 'set $displayName ' );
9227+ builder.writeExecutableFragment (this , 'set $displayName ' );
92889228 }
92899229}
92909230
0 commit comments