当前位置: 首页 > news >正文

济南房地产网站建设如何建设自己的网站

济南房地产网站建设,如何建设自己的网站,建网站选号域名,wordpress多个页面主题deprecatedJDK增强建议 #xff08;JEP#xff09;277#xff08;“ 增强的弃用 ”#xff09;建议“重新定义弃用注释#xff0c;并提供加强功能生命周期尾端的工具。” 当前 java.lang.Deprecated的一些限制使我困扰了一段时间。 我特别希望能够使用Deprecated提供文本JEP277“ 增强的弃用 ”建议“重新定义弃用注释并提供加强功能生命周期尾端的工具。” 当前 java.lang.Deprecated的一些限制使我困扰了一段时间。 我特别希望能够使用Deprecated提供文本而不是被迫在相应的Javadoc deprecated注释中放置说明性文本。 在这篇文章中我看了一个自定义批注它给人一种JEP 277提议包含在新的改进的Deprecated批注中的额外元数据类型的感觉。 dustin.examples.annotations.Deprecated的代码清单包含dustin.examples.annotations.Deprecated的定义该实现主要反映JEP 277提案中描述的内容。 不推荐使用dustin.examples.annotations。 package dustin.examples.annotations;import java.lang.annotation.Documented; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target;import static java.lang.annotation.ElementType.*; import static java.lang.annotation.ElementType.TYPE;/*** Conceptual improvement on standard java.lang.Deprecated annotation* based on preliminary discussion related to JEP 277 and on* desire to include context details with deprecation annotation* rather than relying on presence of Javadocs deprecated.** Javadoc comments in this annotation definition are largely* based on descriptions in JEP 277 (http://openjdk.java.net/jeps/277).*/ Documented Retention(RetentionPolicy.RUNTIME) Target({CONSTRUCTOR,FIELD,LOCAL_VARIABLE,METHOD,PACKAGE,PARAMETER,TYPE}) public interface Deprecated {/*** JEP 277-defined reasons and associated explanations.*/public enum Reason{/*** This API has been deprecated without any reason having been given.* This is the default value; everything thats deprecated today* implicitly has a deprecation reason of UNSPECIFIED.*/UNSPECIFIED,/*** This API is earmarked for removal in a future JDK release. Note,* the use of the word condemned here is used in the sense of a* structure that is intended to be torn down. The term is not mean* to imply any moral censure.*/CONDEMNED,/*** Use of this API can lead to data loss, deadlock, security* vulnerability, incorrect results, or loss of JVM integrity.*/DANGEROUS,/*** This API is no longer necessary, and usages should be removed.* No replacement API exists. Note that OBSOLETE APIs might or* might not be marked CONDEMNED.*/OBSOLETE,/*** This API has been replaced by a newer API, and usages should be* migrated away from this API to the newer API. Note that SUPERSEDED* APIs might or might not be marked CONDEMNED.*/SUPERSEDED,/*** Calling this has no effect or will unconditionally throw an exception.*/UNIMPLEMENTED,/*** This API is not a stable part of the specification, and it may* change incompatibly or disappear at any time.*/EXPERIMENTAL;}/*** Provides any combination of one or more of the enum constants,* although not all combinations make sense. It is syntactically possible,* though perverse, to provide an empty array. Such a case should be* treated as if UNSPECIFIED were present.** return One or more Reasons for deprecation; default value is the enum* constant UNSPECIFIED and absence of values should be treated as such.*/Reason[] value();/*** Provides Strings representing any APIs that replace this API.* This should not specify any replacements if reason is OBSOLETE.** return Strings returned by this method should be links to replacement* APIs for the API being deprecated. Each string should be in the same* format as the link Javadoc tag.*/String[] replacement();/*** Provides the release in which the API was deprecated.** return Release number at which this API became deprecated* in a free-form syntax String with the release numbering* following the same scheme as the since Javadoc tag.*/String since();/*** Provides the anticipated complete removal of this deprecated API* if any known date or version is anticipated for the APIs removal.* This value is most likely to be set for reasons of CONDEMNED,* OBSOLETE, and SUPERSEDED. This value is NOT described in JEP 277.** return Date or version in which it is anticipated that this* API will be removed altogether.*/String anticipatedRemoval() default Not Planned; } 下一个代码清单提供了将上述注释应用于不推荐使用的类的示例。 DeprecatedClass.java使用改进的Deprecated的示例 package dustin.examples.annotations.demo;import java.text.DateFormat; import java.text.SimpleDateFormat;import static dustin.examples.annotations.Deprecated.Reason.*;/*** Demonstrates how new and improved Deprecated might be used.*/ dustin.examples.annotations.Deprecated(value{SUPERSEDED, CONDEMNED},since1.5, anticipatedRemoval1.9,replacementdustin.examples.annotations.demo.OtherClass) public class DeprecatedClass {final DateFormat dateFormat new SimpleDateFormat(yyyy-MM-ddTHH:mm:ss.SSSZ);dustin.examples.annotations.Deprecated(value{DANGEROUS}, since1.0,replacementjava.text.SimpleDateFormat#SimpleDateFormat)public DateFormat getDateFormatter(){return dateFormat;} } 最后一个示例演示了改进的Deprecated注释的Deprecated 。 该“ anticipatedRemoval中的”元素Deprecated注释不JEP 277中提到我给它一个默认值其中过时的构造可能没有预期的拆除日期而是已被弃用以吓退只有它的新用途的情况。 上面的代码清单演示了定义一个新的和改进的Deprecated批注例如JEP 277中阐明的注释。但是JEP 277提出的远远不止一个改进的批注。 该提案还讨论了“运行时更改”以提供“关于在选择加入的基础上使用已弃用API的警告”“依赖工具增强”以类似于jdeps工具甚至可能基于jdeps工具的方式分析注释依赖以及“ Javadoc增强功能。” 尽管Java的自定义注释支持使实现Deprecated的版本很容易实现该版本反映了JEP 277中的许多思想但是经过改进的新版java.lang.Deprecated将具有许多自定义Java注释不具备的优点例如内置-JDK中的-in支持并由JDK类使用。 由JDK提供的Deprecated也将继续享受IDE和工具带来的好处例如删除不赞成使用的代码结构的名称。 翻译自: https://www.javacodegeeks.com/2015/11/what-might-a-new-deprecated-look-like.htmldeprecated
http://www.pierceye.com/news/837002/

相关文章:

  • 怎么快速建立一个网站如何用腾讯云服务器搭建wordpress
  • 五屏网站建设多少钱深圳网站公司有哪些
  • 莆田网站建站wordpress cd
  • 软件下载安装免费南京seo关键词优化服务
  • 广州网站设计软件建设将网站加入受信网站再试
  • 淘宝联盟网站备案常见的互联网应用
  • 自己做网站 搜索功能开发企业综合信息服务平台
  • 意大利语网站建设wordpress主题首页显示不全
  • 模板网站免费下载wordpress启用静态
  • 保定网站建设哪家好网站建设实践报告3000字
  • 网站制作项目执行免费制作微网站
  • 西安网站制作费用网站建设小程序开发报价
  • 深圳做针织衫服装的网站软件开发工具手机版
  • 网站域名注册的相关证书证明文件最珠海app
  • 网站规划建设与管理维护大学论文免费个人搭建网站
  • 网站解析时候让做别名企业密信app下载安装
  • 直播网站建设模板网站中文商标域名注册
  • 商务网站建设与管理读后感为什么公司要做网站
  • 高密 网站建设wordpress设置置顶文章
  • 购物京东商城西安官网seo哪家公司好
  • 专门做库存处理的网站沭阳建设网站
  • 建筑必看六个网站门户网站地方生活门户有哪些
  • 江阴 网站开发python基础教程百度亿
  • 邹城网站建设v556本校网站建设
  • 郑州一站式网站搭建北京装饰公司十大排名
  • 网站建设程序代码百度智能创作平台
  • 网上制作网站建立中文网站的英文
  • 网站域名过户查询太原企业网站怎么优化
  • 西安哪些做网站的公司创业平台网站
  • 做网站费用滁州wordpress 快站