ElementKind class

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-onlyinherited
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-onlyinherited

Methods

compareTo(ElementKind other) int
Compares this object to another object.
override
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.
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

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