What problem does it solve?
This Skill helps developers write more robust, maintainable, and secure Java code by adhering to established best practices and design principles, particularly those outlined by Joshua Bloch.
Core Features & Use Cases
- Defensive Design: Emphasizes creating APIs that are easy to use correctly and hard to use incorrectly.
- Immutability: Guides on making classes immutable by default to enhance thread-safety and predictability.
- Composition over Inheritance: Promotes using composition for code reuse to avoid the pitfalls of inheritance.
- Use Case: When designing a new public API for a Java library, use this Skill to ensure the API is intuitive, prevents common errors, and is easy for other developers to integrate with.
Quick Start
Review the attached Java code file for adherence to Effective Java principles.