为什么去@ precated的的RetentionPolicy是在运行? [英] Why the RetentionPolicy for @deprecated is RUNTIME?

查看:277
本文介绍了为什么去@ precated的的RetentionPolicy是在运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么在运行时任何有兴趣知道的方法去precated?一些可以为我提供一些例子吗?

Why at runtime is anyone interested in knowing that a method is deprecated? Can some provide me with some examples?

推荐答案

有一些框架和实例对象的工具与他们合作。

There are some frameworks and tools that instantiate objects to work with them.

例如,许多JavaBean的UI编辑器创建bean的实例,并与他们作为用户操纵他们设计的UI交互。

For example, many JavaBean UI editors create instances of the beans and interact with them as the user manipulates the UI they're designing.

具有@德precated在运行时可用注释允许的工具,如这标志DE precated方法,事件,为用户属性。

Having the @Deprecated annotation available at runtime allows tools such as this to flag deprecated methods, events, properties for the user.

这篇关于为什么去@ precated的的RetentionPolicy是在运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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