public final ClassDeclarationContext classDeclaration() throws RecognitionException {
		ClassDeclarationContext _localctx = new ClassDeclarationContext(_ctx, getState());
		enterRule(_localctx, 14, RULE_classDeclaration);
		int _la;
		try {
			enterOuterAlt(_localctx, 1);
			{
			setState(287); match(CLASS);
			setState(288); match(Identifier);
			setState(290);
			_la = _input.LA(1);
			if (_la==LT) {
				{
				setState(289); typeParameters();
				}
			}

			setState(294);
			_la = _input.LA(1);
			if (_la==EXTENDS) {
				{
				setState(292); match(EXTENDS);
				setState(293); type();
				}
			}

			setState(298);
			_la = _input.LA(1);
			if (_la==IMPLEMENTS) {
				{
				setState(296); match(IMPLEMENTS);
				setState(297); typeList();
				}
			}

			setState(300); classBody();
			}
		}
		catch (RecognitionException re) {
			_localctx.exception = re;
			_errHandler.reportError(this, re);
			_errHandler.recover(this, re);
		}
		finally {
			exitRule();
		}
		return _localctx;
	}