ElementVisitor<R> class Null safety

An object that can be used to visit an element structure.

Clients may not extend, implement or mix-in this class. There are classes that implement this interface that provide useful default behaviors in package:analyzer/dart/element/visitor.dart. A couple of the most useful include

  • SimpleElementVisitor which implements every visit method by doing nothing,
  • RecursiveElementVisitor which will cause every node in a structure to be visited, and
  • ThrowingElementVisitor which implements every visit method by throwing an exception.




hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited


noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
toString() String
A string representation of this object. [...]
visitClassElement(ClassElement element) → R?
visitCompilationUnitElement(CompilationUnitElement element) → R?
visitConstructorElement(ConstructorElement element) → R?
visitExportElement(ExportElement element) → R?
visitExtensionElement(ExtensionElement element) → R?
visitFieldElement(FieldElement element) → R?
visitFieldFormalParameterElement(FieldFormalParameterElement element) → R?
visitFunctionElement(FunctionElement element) → R?
visitGenericFunctionTypeElement(GenericFunctionTypeElement element) → R?
visitImportElement(ImportElement element) → R?
visitLabelElement(LabelElement element) → R?
visitLibraryElement(LibraryElement element) → R?
visitLocalVariableElement(LocalVariableElement element) → R?
visitMethodElement(MethodElement element) → R?
visitMultiplyDefinedElement(MultiplyDefinedElement element) → R?
visitParameterElement(ParameterElement element) → R?
visitPrefixElement(PrefixElement element) → R?
visitPropertyAccessorElement(PropertyAccessorElement element) → R?
visitTopLevelVariableElement(TopLevelVariableElement element) → R?
visitTypeAliasElement(TypeAliasElement element) → R?
visitTypeParameterElement(TypeParameterElement element) → R?


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