Effective Java : programmimg language guide

著者

    • Bloch, Joshua

書誌事項

Effective Java : programmimg language guide

Joshua Bloch

(The Java series)

Addison-Wesley , Sun Microsystems, c2001

大学図書館所蔵 件 / 15

この図書・雑誌をさがす

注記

Includes bibliographical references (p. 233-237) and index

内容説明・目次

内容説明

A new edition of this title is available, ISBN-10: 0321356683 ISBN-13: 9780321356680

目次

Foreword. Preface. Acknowledgements. 1. Introduction. 2. Creating and Destroying Objects. Consider Providing Static Factory Methods Instead of Constructors. Enforce the Singleton Property with a Private Constructor. Enforce Noninstantiability with a Private Constructor. Avoid Creating Duplicate Objects. Eliminate Obsolete Object References. Avoid Finalizers. 3. Methods Common to All Objects. Obey the General Contract when Overriding Equals. Always Override HashCode When You Override Equals. Always Override to String. Override Clone Judiciously. Consider Implementing Comparable. 4. Classes and Interfaces. Minimize the Accessibility of Classes and Members. Favor Immutability. Favor Composition Over Inheritance. Design and Document for Inheritance or Else Prohibit It. Prefer Interfaces to Abstract Classes. Use Interfaces Only to Define Types. Favor Static Member Classes Over Non-Static. 5. Substitutes for C Constructs. Replace Structures with Classes. Replace Unions with Class Hierarchies. Replace Enums with Classes. Replace Function Pointers with Classes and Interfaces. 6. Methods. Check Parameters for Validity. Make Defensive Copies when Needed. Design Method Signatures Carefully. Use Overloading Judiciously. Return Zero-Length Arrays, Not Nulls. Write Doc Comments for All Exposed API Elements. 7. General Programming. Minimize the Scope of Local Variables. Know and Use the Libraries. Avoid Float and Double if Exact Answers are Required. Avoid Strings where Other Types are More Appropriate. Beware the Performance of String Concatenation. Refer to Objects by their Interfaces. Prefer Interfaces to Reflection. Use Native Methods Judiciously. Optimize Judiciously. Adhere to Generally Accepted Naming Conventions. 8. Exceptions. Use Exceptions Only for Exceptional Conditions. Use Checked Exceptions for Recoverable Conditions, Runtime Exceptions for Programming Errors. Avoid Unnecessary Use of Checked Exceptions. Favor the Use of Standard Exceptions. Throw Exceptions Appropriate to the Abstraction. Document All Exceptions Thrown by Each Method. Include Failure-Capture Information in Detail Messages. Strive for Failure Atomicity. Don't Ignore Exceptions. 9. Threads. Synchronize Access to Shared Mutable Data. Avoid Excessive Synchronization. Never Invoke Wait Outside a Loop. Don't Depend on the Thread Scheduler. Document Thread-Safety. Avoid Thread Groups. 10. Serialization. Implement Serializable Judiciously. Consider Using a Custom Serialized Form. Write ReadObject Methods Defensively. Provide a ReadResolve Method when Necessary. References. Index.

「Nielsen BookData」 より

関連文献: 1件中  1-1を表示

詳細情報

  • NII書誌ID(NCID)
    BA54227885
  • ISBN
    • 0201310058
  • 出版国コード
    us
  • タイトル言語コード
    eng
  • 本文言語コード
    eng
  • 出版地
    Boston ; Tokyo,Palo Alto, Calif.
  • ページ数/冊数
    xvi, 252 p.
  • 大きさ
    24 cm
  • 親書誌ID
ページトップへ