编辑: 人间点评 | 2019-07-11 |
3 Rules of Purity
2 -
4 The Rules
2 -
5 ii 100% Pure Java Cookbook Guidelines for Developing Pure Programs How to Develop a Program.3 -
1 Use of Native Code.3 -
3 Use of exec
3 -
4 Failure to Use the Portability Features of Java Core API
3 -
4 Reflection
3 -
4 Direct Use of AWT Peer Classes.3 -
4 Misuse of System.exit
3 -
5 Use of Hard-Coded File Paths
3 -
5 JDBC? Driver Loading
3 -
7 Line Termination
3 -
8 Unportable Command-Line Programs.3 -
9 Command Line Processing
3 -
9 Internationalization
3 -
9 Unicode Rendering
3 -
9 File I/O
3 -
10 GUI Element Size.3 -
10 GUI Fonts
3 -
10 GUI Appearance
3 -
10 The Paint Protocol
3 -
11 Mixed Event Models
3 -
12 Use of Deprecated Methods.3 -
12 The Object.hashCode and Object.equals Methods
3 -
12 Installation Issues
3 -
13 Hostname Format
3 -
13 Pluggable Look and Feel
3 -
14 Mixing Classes Compiled on Different Versions of the Java Platform
3 -
15 Portability Hints
3 -
16 Security Exceptions
3 -
16 Coping with Bugs
3 -
17 Explanations of Purity Problems and Variances Explanations of Purity Problems
4 -
1 Report Information Categories
4 -
1 Explanations.4 -
2 Warnings.4 -
2 Possible Hardcoded Path
4 -
2 Mixing the 1.0 and 1.1 Event Models
4 -
2 Dynamically Loaded Classes:4 -
2 Object is Compiled for a Previous (Java Development Kit) release
4 -
3 Unsupported Pluggable Look and Feel
4 -
3 Errors.4 -
4 Constant Strings with OS-Specific Syntax Used in I/O Class Constructors . . .
4 -
4 Peer Use
4 -
4 Revision Date: 10/00 iii Use of Native Code
4 -
4 Use of java.lang.Runtime.exec.4 -
4 Injection into Core Library
4 -
4 Undefined Reference
4 -
4 Undocumented Internal sun.* Class
4 -
4 Variances.4 -
5 Types of Variances
4 -
5 The Variances.4 -
5 Variances for Program Invocation
4 -
5 Variances for Programs Containing Native Code
4 -
7 Miscellaneous Variances.4 -
9 Available Java Platforms Platforms for Java Applications and Applets A -
1 Available Platforms for Java Application Environment Version 1.0.2 A -
2 Available Platforms for Java Application Environment 1.1 A -
3 Available Platforms for Java Application Environment 1.2 A -
4 Frequently Asked Questions for Purity Frequently Asked Questions B -
1 iv 100% Pure Java Cookbook Revision Date: 10/00
1 -
1 Introduction
1 The 100% Pure Java? Standard The 100% Pure Java? Standard is part of Sun Microsystems initiative to promote the development of portable applications, applets, beans, class libraries, and servlets written using the Java? Programming language. Compliance to the standard consists of code analysis and testing the program on multiple Java Application Environment. This cookbook will assist you in the process of understanding the guidelines for writing portable code. The steps described in this guide are designed to ensure that your code is portable and that it will meet your customer'
s expectations of a 100% Pure Java program. About this Guide This guide covers all of the basic things that you should know about the 100% Pure Java Standard. This document serves as: ? Developers Style Guide: for developers using the Java programming language who want to maximize the portability of their programs. It explains the important difference between merely writing programs using the Java programming language, and writing effective and portable programs that will indeed run on Java Compatible platform or device. ? Programming Manual for Purity: for programmers. It presents the rules for compliance with 100% Pure Java standard. It also provides practical hints and