ElementKind class Null safety

The kind of elements in the element model.

Clients may not extend, implement or mix-in this class.

Implemented types

Constructors

ElementKind(String name, int ordinal, String displayName)
Initialize a newly created element kind to have the given displayName.
const

Properties

displayName String
The name displayed in the UI for this kind of element.
final
hashCode int
The hash code for this object. [...]
read-only, override
name String
The name of this element kind.
final
ordinal int
The ordinal value of the element kind.
final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

compareTo(ElementKind other) int
Compares this object to another object. [...]
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
override

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited

Static Methods

of(Element? element) ElementKind
Return the kind of the given element, or ERROR if the element is null. This is a utility method that can reduce the need for null checks in other places.

Constants

CLASS → const ElementKind
ElementKind('CLASS', 0, "class")
COMPILATION_UNIT → const ElementKind
ElementKind('COMPILATION_UNIT', 1, "compilation unit")
CONSTRUCTOR → const ElementKind
ElementKind('CONSTRUCTOR', 2, "constructor")
DYNAMIC → const ElementKind
ElementKind('DYNAMIC', 3, "<dynamic>")
ENUM → const ElementKind
ElementKind('ENUM', 4, "enum")
ERROR → const ElementKind
ElementKind('ERROR', 5, "<error>")
EXPORT → const ElementKind
ElementKind('EXPORT', 6, "export directive")
EXTENSION → const ElementKind
ElementKind('EXTENSION', 7, "extension")
FIELD → const ElementKind
ElementKind('FIELD', 8, "field")
FUNCTION → const ElementKind
ElementKind('FUNCTION', 9, "function")
FUNCTION_TYPE_ALIAS → const ElementKind
ElementKind('FUNCTION_TYPE_ALIAS', 23, "function type alias")
GENERIC_FUNCTION_TYPE → const ElementKind
ElementKind('GENERIC_FUNCTION_TYPE', 10, 'generic function type')
GETTER → const ElementKind
ElementKind('GETTER', 11, "getter")
IMPORT → const ElementKind
ElementKind('IMPORT', 12, "import directive")
LABEL → const ElementKind
ElementKind('LABEL', 13, "label")
LIBRARY → const ElementKind
ElementKind('LIBRARY', 14, "library")
LOCAL_VARIABLE → const ElementKind
ElementKind('LOCAL_VARIABLE', 15, "local variable")
METHOD → const ElementKind
ElementKind('METHOD', 16, "method")
NAME → const ElementKind
ElementKind('NAME', 17, "<name>")
NEVER → const ElementKind
ElementKind('NEVER', 18, "<never>")
PARAMETER → const ElementKind
ElementKind('PARAMETER', 19, "parameter")
PREFIX → const ElementKind
ElementKind('PREFIX', 20, "import prefix")
SETTER → const ElementKind
ElementKind('SETTER', 21, "setter")
TOP_LEVEL_VARIABLE → const ElementKind
ElementKind('TOP_LEVEL_VARIABLE', 22, "top level variable")
TYPE_ALIAS → const ElementKind
ElementKind('TYPE_ALIAS', 25, "type alias")
TYPE_PARAMETER → const ElementKind
ElementKind('TYPE_PARAMETER', 24, "type parameter")
UNIVERSE → const ElementKind
ElementKind('UNIVERSE', 26, "<universe>")
values → const List<ElementKind>
[CLASS, COMPILATION_UNIT, CONSTRUCTOR, DYNAMIC, ENUM, ERROR, EXPORT, FIELD, FUNCTION, GENERIC_FUNCTION_TYPE, GETTER, IMPORT, LABEL, LIBRARY, LOCAL_VARIABLE, METHOD, NAME, NEVER, PARAMETER, PREFIX, SET…