예제 #1
0
        public override void EnterClassDeclaration([NotNull] JavaParser.ClassDeclarationContext context)
        {
            Logger.Debug("parsing class");

            var inputStream = context.Start.InputStream;

            var interval = new Interval(context.Start.StartIndex, context.Stop.StopIndex);

            _currentClassModel = new Class(context.Identifier()?.GetText(), inputStream.GetText(interval));
            if (_currentComilationUnit != null)
            {
                _currentComilationUnit.AddClass(_currentClassModel);
            }

            _methodListener.setCurrentClass(_currentClassModel);
            _memberListener.setCurrentClass(_currentClassModel);

            InvokeParseInfoUpdate("Finished parsing class: " + _currentClassModel.Name);
        }