GeneralizingAstVisitor<R> class
An AST visitor that will recursively visit all of the nodes in an AST structure (like instances of the class RecursiveAstVisitor). In addition, when a node of a specific type is visited not only will the visit method for that specific type of node be invoked, but additional methods for the superclasses of that node will also be invoked. For example, using an instance of this class to visit a Block will cause the method visitBlock to be invoked but will also cause the methods visitStatement and visitNode to be subsequently invoked. This allows visitors to be written that visit all statements without needing to override the visit method for each of the specific subclasses of Statement.
Subclasses that override a visit method must either invoke the overridden visit method or explicitly invoke the more general visit method. Failure to do so will cause the visit methods for superclasses of the node to not be invoked and will cause the children of the visited node to not be visited.
Clients may extend this class.
- Implemented types
-
- AstVisitor<
R>
- AstVisitor<
- Implementers
Constructors
- GeneralizingAstVisitor()
-
Initialize a newly created visitor.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
visitAdjacentStrings(
AdjacentStrings node) → R? -
override
-
visitAnnotatedNode(
AnnotatedNode node) → R? -
visitAnnotation(
Annotation node) → R? -
override
-
visitArgumentList(
ArgumentList node) → R? -
override
-
visitAsExpression(
AsExpression node) → R? -
override
-
visitAssertInitializer(
AssertInitializer node) → R? -
override
-
visitAssertStatement(
AssertStatement node) → R? -
override
-
visitAssignedVariablePattern(
AssignedVariablePattern node) → R? -
override
-
visitAssignmentExpression(
AssignmentExpression node) → R? -
override
-
visitAugmentationImportDirective(
AugmentationImportDirective node) → R? -
override
-
visitAwaitExpression(
AwaitExpression node) → R? -
override
-
visitBinaryExpression(
BinaryExpression node) → R? -
override
-
visitBlock(
Block node) → R? -
override
-
visitBlockFunctionBody(
BlockFunctionBody node) → R? -
override
-
visitBooleanLiteral(
BooleanLiteral node) → R? -
override
-
visitBreakStatement(
BreakStatement node) → R? -
override
-
visitCascadeExpression(
CascadeExpression node) → R? -
override
-
visitCaseClause(
CaseClause node) → R? -
override
-
visitCastPattern(
CastPattern node) → R? -
override
-
visitCatchClause(
CatchClause node) → R? -
override
-
visitCatchClauseParameter(
CatchClauseParameter node) → R? -
override
-
visitClassDeclaration(
ClassDeclaration node) → R? -
override
-
visitClassMember(
ClassMember node) → R? -
visitClassTypeAlias(
ClassTypeAlias node) → R? -
override
-
visitCollectionElement(
CollectionElement node) → R? -
visitCombinator(
Combinator node) → R? -
visitComment(
Comment node) → R? -
override
-
visitCommentReference(
CommentReference node) → R? -
override
-
visitCompilationUnit(
CompilationUnit node) → R? -
override
-
visitCompilationUnitMember(
CompilationUnitMember node) → R? -
visitConditionalExpression(
ConditionalExpression node) → R? -
override
-
visitConfiguration(
Configuration node) → R? -
override
-
visitConstantPattern(
ConstantPattern node) → R? -
override
-
visitConstructorDeclaration(
ConstructorDeclaration node) → R? -
override
-
visitConstructorFieldInitializer(
ConstructorFieldInitializer node) → R? -
override
-
visitConstructorInitializer(
ConstructorInitializer node) → R? -
visitConstructorName(
ConstructorName node) → R? -
override
-
visitConstructorReference(
ConstructorReference node) → R? -
override
-
visitConstructorSelector(
ConstructorSelector node) → R? -
override
-
visitContinueStatement(
ContinueStatement node) → R? -
override
-
visitDartPattern(
DartPattern node) → R? -
visitDeclaration(
Declaration node) → R? -
visitDeclaredIdentifier(
DeclaredIdentifier node) → R? -
override
-
visitDeclaredVariablePattern(
DeclaredVariablePattern node) → R? -
override
-
visitDefaultFormalParameter(
DefaultFormalParameter node) → R? -
override
-
visitDirective(
Directive node) → R? -
visitDoStatement(
DoStatement node) → R? -
override
-
visitDottedName(
DottedName node) → R? -
override
-
visitDoubleLiteral(
DoubleLiteral node) → R? -
override
-
visitEmptyFunctionBody(
EmptyFunctionBody node) → R? -
override
-
visitEmptyStatement(
EmptyStatement node) → R? -
override
-
visitEnumConstantArguments(
EnumConstantArguments node) → R? -
override
-
visitEnumConstantDeclaration(
EnumConstantDeclaration node) → R? -
override
-
visitEnumDeclaration(
EnumDeclaration node) → R? -
override
-
visitExportDirective(
ExportDirective node) → R? -
override
-
visitExpression(
Expression node) → R? -
visitExpressionFunctionBody(
ExpressionFunctionBody node) → R? -
override
-
visitExpressionStatement(
ExpressionStatement node) → R? -
override
-
visitExtendsClause(
ExtendsClause node) → R? -
override
-
visitExtensionDeclaration(
ExtensionDeclaration node) → R? -
override
-
visitExtensionOverride(
ExtensionOverride node) → R? -
override
-
visitFieldDeclaration(
FieldDeclaration node) → R? -
override
-
visitFieldFormalParameter(
FieldFormalParameter node) → R? -
override
-
visitForEachParts(
ForEachParts node) → R? -
visitForEachPartsWithDeclaration(
ForEachPartsWithDeclaration node) → R? -
override
-
visitForEachPartsWithIdentifier(
ForEachPartsWithIdentifier node) → R? -
override
-
visitForEachPartsWithPattern(
ForEachPartsWithPattern node) → R? -
override
-
visitForElement(
ForElement node) → R? -
override
-
visitFormalParameter(
FormalParameter node) → R? -
visitFormalParameterList(
FormalParameterList node) → R? -
override
-
visitForParts(
ForParts node) → R? -
visitForPartsWithDeclarations(
ForPartsWithDeclarations node) → R? -
override
-
visitForPartsWithExpression(
ForPartsWithExpression node) → R? -
override
-
visitForPartsWithPattern(
ForPartsWithPattern node) → R? -
override
-
visitForStatement(
ForStatement node) → R? -
override
-
visitFunctionBody(
FunctionBody node) → R? -
visitFunctionDeclaration(
FunctionDeclaration node) → R? -
override
-
visitFunctionDeclarationStatement(
FunctionDeclarationStatement node) → R? -
override
-
visitFunctionExpression(
FunctionExpression node) → R? -
override
-
visitFunctionExpressionInvocation(
FunctionExpressionInvocation node) → R? -
override
-
visitFunctionReference(
FunctionReference node) → R? -
override
-
visitFunctionTypeAlias(
FunctionTypeAlias node) → R? -
override
-
visitFunctionTypedFormalParameter(
FunctionTypedFormalParameter node) → R? -
override
-
visitGenericFunctionType(
GenericFunctionType node) → R? -
override
-
visitGenericTypeAlias(
GenericTypeAlias node) → R? -
override
-
visitGuardedPattern(
GuardedPattern node) → R? -
override
-
visitHideCombinator(
HideCombinator node) → R? -
override
-
visitIdentifier(
Identifier node) → R? -
visitIfElement(
IfElement node) → R? -
override
-
visitIfStatement(
IfStatement node) → R? -
override
-
visitImplementsClause(
ImplementsClause node) → R? -
override
-
visitImplicitCallReference(
ImplicitCallReference node) → R? -
override
-
visitImportDirective(
ImportDirective node) → R? -
override
-
visitImportPrefixReference(
ImportPrefixReference node) → R? -
override
-
visitIndexExpression(
IndexExpression node) → R? -
override
-
visitInstanceCreationExpression(
InstanceCreationExpression node) → R? -
override
-
visitIntegerLiteral(
IntegerLiteral node) → R? -
override
-
visitInterpolationElement(
InterpolationElement node) → R? -
visitInterpolationExpression(
InterpolationExpression node) → R? -
override
-
visitInterpolationString(
InterpolationString node) → R? -
override
-
visitInvocationExpression(
InvocationExpression node) → R? -
visitIsExpression(
IsExpression node) → R? -
override
-
visitLabel(
Label node) → R? -
override
-
visitLabeledStatement(
LabeledStatement node) → R? -
override
-
visitLibraryAugmentationDirective(
LibraryAugmentationDirective node) → R? -
override
-
visitLibraryDirective(
LibraryDirective node) → R? -
override
-
visitLibraryIdentifier(
LibraryIdentifier node) → R? -
override
-
visitListLiteral(
ListLiteral node) → R? -
override
-
visitListPattern(
ListPattern node) → R? -
override
-
visitLiteral(
Literal node) → R? -
visitLogicalAndPattern(
LogicalAndPattern node) → R? -
override
-
visitLogicalOrPattern(
LogicalOrPattern node) → R? -
override
-
visitMapLiteralEntry(
MapLiteralEntry node) → R? -
override
-
visitMapPattern(
MapPattern node) → R? -
override
-
visitMapPatternEntry(
MapPatternEntry node) → R? -
override
-
visitMethodDeclaration(
MethodDeclaration node) → R? -
override
-
visitMethodInvocation(
MethodInvocation node) → R? -
override
-
visitMixinDeclaration(
MixinDeclaration node) → R? -
override
-
visitNamedCompilationUnitMember(
NamedCompilationUnitMember node) → R? -
visitNamedExpression(
NamedExpression node) → R? -
override
-
visitNamedType(
NamedType node) → R? -
override
-
visitNamespaceDirective(
NamespaceDirective node) → R? -
visitNativeClause(
NativeClause node) → R? -
override
-
visitNativeFunctionBody(
NativeFunctionBody node) → R? -
override
-
visitNode(
AstNode node) → R? -
visitNormalFormalParameter(
NormalFormalParameter node) → R? -
visitNullAssertPattern(
NullAssertPattern node) → R? -
override
-
visitNullCheckPattern(
NullCheckPattern node) → R? -
override
-
visitNullLiteral(
NullLiteral node) → R? -
override
-
visitObjectPattern(
ObjectPattern node) → R? -
override
-
visitOnClause(
OnClause node) → R? -
override
-
visitParenthesizedExpression(
ParenthesizedExpression node) → R? -
override
-
visitParenthesizedPattern(
ParenthesizedPattern node) → R? -
override
-
visitPartDirective(
PartDirective node) → R? -
override
-
visitPartOfDirective(
PartOfDirective node) → R? -
override
-
visitPatternAssignment(
PatternAssignment node) → R? -
override
-
visitPatternField(
PatternField node) → R? -
override
-
visitPatternFieldName(
PatternFieldName node) → R? -
override
-
visitPatternVariableDeclaration(
PatternVariableDeclaration node) → R? -
override
-
visitPatternVariableDeclarationStatement(
PatternVariableDeclarationStatement node) → R? -
override
-
visitPostfixExpression(
PostfixExpression node) → R? -
override
-
visitPrefixedIdentifier(
PrefixedIdentifier node) → R? -
override
-
visitPrefixExpression(
PrefixExpression node) → R? -
override
-
visitPropertyAccess(
PropertyAccess node) → R? -
override
-
visitRecordLiteral(
RecordLiteral node) → R? -
override
-
visitRecordPattern(
RecordPattern node) → R? -
override
-
visitRecordTypeAnnotation(
RecordTypeAnnotation node) → R? -
override
-
visitRecordTypeAnnotationField(
RecordTypeAnnotationField node) → R? -
visitRecordTypeAnnotationNamedField(
RecordTypeAnnotationNamedField node) → R? -
override
-
visitRecordTypeAnnotationNamedFields(
RecordTypeAnnotationNamedFields node) → R? -
override
-
visitRecordTypeAnnotationPositionalField(
RecordTypeAnnotationPositionalField node) → R? -
override
-
visitRedirectingConstructorInvocation(
RedirectingConstructorInvocation node) → R? -
override
-
visitRelationalPattern(
RelationalPattern node) → R? -
override
-
visitRestPatternElement(
RestPatternElement node) → R? -
override
-
visitRethrowExpression(
RethrowExpression node) → R? -
override
-
visitReturnStatement(
ReturnStatement node) → R? -
override
-
visitScriptTag(
ScriptTag scriptTag) → R? -
override
-
visitSetOrMapLiteral(
SetOrMapLiteral node) → R? -
override
-
visitShowCombinator(
ShowCombinator node) → R? -
override
-
visitSimpleFormalParameter(
SimpleFormalParameter node) → R? -
override
-
visitSimpleIdentifier(
SimpleIdentifier node) → R? -
override
-
visitSimpleStringLiteral(
SimpleStringLiteral node) → R? -
override
-
visitSingleStringLiteral(
SingleStringLiteral node) → R? -
visitSpreadElement(
SpreadElement node) → R? -
override
-
visitStatement(
Statement node) → R? -
visitStringInterpolation(
StringInterpolation node) → R? -
override
-
visitStringLiteral(
StringLiteral node) → R? -
visitSuperConstructorInvocation(
SuperConstructorInvocation node) → R? -
override
-
visitSuperExpression(
SuperExpression node) → R? -
override
-
visitSuperFormalParameter(
SuperFormalParameter node) → R? -
override
-
visitSwitchCase(
SwitchCase node) → R? -
override
-
visitSwitchDefault(
SwitchDefault node) → R? -
override
-
visitSwitchExpression(
SwitchExpression node) → R? -
override
-
visitSwitchExpressionCase(
SwitchExpressionCase node) → R? -
override
-
visitSwitchMember(
SwitchMember node) → R? -
visitSwitchPatternCase(
SwitchPatternCase node) → R? -
override
-
visitSwitchStatement(
SwitchStatement node) → R? -
override
-
visitSymbolLiteral(
SymbolLiteral node) → R? -
override
-
visitThisExpression(
ThisExpression node) → R? -
override
-
visitThrowExpression(
ThrowExpression node) → R? -
override
-
visitTopLevelVariableDeclaration(
TopLevelVariableDeclaration node) → R? -
override
-
visitTryStatement(
TryStatement node) → R? -
override
-
visitTypeAlias(
TypeAlias node) → R? -
visitTypeAnnotation(
TypeAnnotation node) → R? -
visitTypeArgumentList(
TypeArgumentList node) → R? -
override
-
visitTypedLiteral(
TypedLiteral node) → R? -
visitTypeLiteral(
TypeLiteral node) → R? -
override
-
visitTypeParameter(
TypeParameter node) → R? -
override
-
visitTypeParameterList(
TypeParameterList node) → R? -
override
-
visitUriBasedDirective(
UriBasedDirective node) → R? -
visitVariableDeclaration(
VariableDeclaration node) → R? -
override
-
visitVariableDeclarationList(
VariableDeclarationList node) → R? -
override
-
visitVariableDeclarationStatement(
VariableDeclarationStatement node) → R? -
override
-
visitWhenClause(
WhenClause node) → R? -
override
-
visitWhileStatement(
WhileStatement node) → R? -
override
-
visitWildcardPattern(
WildcardPattern node) → R? -
override
-
visitWithClause(
WithClause node) → R? -
override
-
visitYieldStatement(
YieldStatement node) → R? -
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited