Name class

A public name, or a private name qualified by a library URI.

Annotations
  • @AnalyzerPublicApi.new(message: 'Exposed by InterfaceElement2 methods')

Constructors

Name(Uri? libraryUri, String name)
factory
Name.forLibrary(LibraryElement? library, String name)
factory

Properties

forGetter → Name
no setter
forSetter → Name
no setter
hashCode → int
The cached, pre-computed hash code.
final
isPublic → bool
Precomputed
final
isSetter → bool
no setter
libraryUri → Uri?
If the name is private, the URI of the defining library. Otherwise, it is null.
final
name → String
The name of this name object. If the name starts with _, then the name is private. Names of setters end with =.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

isAccessibleFor(Uri libraryUri) → bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
override

Static Methods

forElement(Element element) → Name?
Returns the name that corresponds to element.