ClassNodeExtension extension

Extension for the ClassDeclaration class from the analyzer package. Adds helper methods for working with class members.

on
  • ClassDeclaration

Properties

classMembers → NodeList<ClassMember>

Available on ClassDeclaration, provided by the ClassNodeExtension extension

Returns the list of class members. Use this instead of the deprecated members property. Cast body to BlockClassBody to access members.
no setter
classRightBracket → Token

Available on ClassDeclaration, provided by the ClassNodeExtension extension

Returns the right bracket token of the class body. Use this instead of the deprecated rightBracket property.
no setter

Methods

getFields() List<FieldDeclaration>

Available on ClassDeclaration, provided by the ClassNodeExtension extension

Returns a list of all fields in the class.
getFunctionBodyByName(String name) → FunctionBody?

Available on ClassDeclaration, provided by the ClassNodeExtension extension

Returns the function body of a method by its name.
getMethod(String name) → MethodDeclaration?

Available on ClassDeclaration, provided by the ClassNodeExtension extension

Returns a class method by its name.