name2 property
The name of the fragment.
Never empty.
If a fragment, e.g. an ExtensionFragment, does not have a name,
then the name is null
.
For an unnamed ConstructorFragment the name is new
, but nameOffset2
is null
. If there is an explicit ClassName.new
, the name is also
new
, and nameOffset2 is not null
. For a synthetic default unnamed
ConstructorElement2 there is always a synthetic ConstructorFragment
with the name new
, and nameOffset2 is null
.
If the fragment declaration node does not have the name specified, and
the parser inserted a synthetic token, then the name is null
, and
nameOffset2 is null
.
For a synthetic GetterFragment or SetterFragment the name is the
name of the corresponding non-synthetic PropertyInducingFragment,
which is usually not null
, but could be. And nameOffset2
is null
for such synthetic fragments.
For a SetterFragment this is the identifier, without =
at the end.
For both unary and binary -
operator this is -
.
Implementation
@override
String get name2;