发生什么事了Java的@OverridingMethodMustCallSuper? [英] What happened to Java's @OverridingMethodMustCallSuper?

查看:1713
本文介绍了发生什么事了Java的@OverridingMethodMustCallSuper?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

难道我的梦想呢?我可以发誓我读一些关于Java 7提供,你可以放在一个方法,以确保所有子类调用父注释。这已被重命名或删除,或者是它从来没有真正考虑?

Did I dream this? I could have swore I read something about java 7 supplying an annotation that you could place on a method to ensure all subclasses call super. Has this been renamed, or dropped, or was it never actually considered?

推荐答案

这是 JSR 305:注释软件缺陷检测并称为<一href=\"http://today.java.net/pub/a/today/2008/09/11/jsr-305-annotations.html#overridingmethodsmustinvokesuper\"相对=nofollow> @OverridingMethodsMustInvokeSuper

It was part of JSR 305: Annotations for Software Defect Detection and called @OverridingMethodsMustInvokeSuper.

该JSR是无效的,但一个参考实现用的提供 = HTTP://$c$c.google.com/p/findbugs/相对=nofollow> FindBugs的

The JSR is inactive, but a reference implementation is available bundled with FindBugs

这篇关于发生什么事了Java的@OverridingMethodMustCallSuper?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆