当前位置:首页 » 编程博文
开发技术指南» 文章正文
    引言: Peeking Inside the Box: Attribut
 

 

 ·文档收藏助手1.0发布测试。    »显示摘要«
    摘要:软件有点大,因为我把.net framework 1.1打在压缩包里了 安装的时候先检测有无安装1.1,如果没有装则先安装1.1,安装完后再执行一次setup.exe 只是一次试验,欢迎批评 下载地址:http://www.chooso.com/docfavoritesetup.rar 大小:30m左右(包括framework 1.1) ......
 ·stl sort算法之研究    »显示摘要«
    摘要:sort模板有两种:---------------------------------------------------------------------template<class ranit> void sort(ranit fist, ranit last);template<class ranit, class pred> void sort(ranit fis......


Peeking Inside the Box: Attribute-Oriented Programming with Java 1.5, Part 2 作者:Don Schwarz

peeking inside the box: attribute-oriented programming with java 1.5

in the previous article, i also defined a new annotation, @status, which i used throughout my code to associate methods with user-readable status messages. for example: 【程序编程相关:优化代码,看看哪个执行速度更快!!!

in the previous article in this series, "peeking inside the box, part 1," i introduced the concepts of attribute-oriented programming, java 1.5 annotations, and bytecode instrumentation. i used these concepts to provide a jstatusbar gui component that reports on the progress of an application without any explicit code. in this article i will introduce a completely different implementation of the same jstatusbar that uses thread sampling rather than bytecode instrumentation. i will then combine the two practices to develop a solution that has the best features of each. 【推荐阅读:我的内容管理系统(CMS)寻找历程 --

as discussed in the previous article, i may want to write additional code which uses the @status annotations for a different purpose. let´s consider the additional requirement that our application must catch all unhandled exceptions and display them to the user. rather than providing a java stack trace, however, it should only display methods that have a @status annotation, and it should not show any code artifacts (class or method names, line numbers, etc.). 【扩展信息:在ASP.NET FORUMS中一种存储

@status("connecting to database") public void connecttodb (string url) { ... }

exception handling

for example, consider the following stack trace:


...   下一页
 ·rman入门实践!    »显示摘要«
    摘要:环境:win2k server; oracle 817 1 将target数据库置于归档模式 更改init.ora 2 建catalog库 3 在target,catalog上分别建表空间,用户,分配权限 sql> create tablespace rman_ts datafile d:\oracle\oradata\rman\rman_ts.dbf" size 20m......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE