visitClassDeclaration method

  1. @override
Object? visitClassDeclaration(
  1. ClassDeclaration node
)
override

Implementation

@override
Object? visitClassDeclaration(dart_ast.ClassDeclaration node) {
  _storeCurrentModel();
  _storeFlutterModule();
  _storeNativeModule();
  final codeComments = _codeCommentsParser(node.documentationComment?.tokens);
  if (node.abstractKeyword != null) {
    if (isUniNativeModule(node.metadata)) {
      _nativeModule = Module(inputFile!,
          name: node.name.name,
          methods: <Method>[],
          codeComments: codeComments);
    } else if (isUniFlutterModule(node.metadata)) {
      _flutterModule = Module(inputFile!,
          name: node.name.name,
          methods: <Method>[],
          codeComments: codeComments);
    }
  } else if (isUniModel(node.metadata)) {
    _currentModel = Model(node.name.name, inputFile!,
        fields: [], codeComments: codeComments);
  }

  node.visitChildren(this);
  return null;
}