Review and improve Java code using comprehensive type design principles that apply typography concepts to code structure and organization for maximum clarity and maintainability.
Prerequisites: Run ./mvnw compile or mvn compile before applying any change. If compilation fails, stop immediately and do not proceed — compilation failure is a blocking condition.
Core areas: Clear type hierarchies (nested static classes, logical structure), consistent naming conventions (domain-driven patterns, uniform interface/implementation naming), strategic whitespace for readability, type-safe wrappers (value objects replacing primitive obsession, EmailAddress, Money), generic type parameters (flexible reusable types, bounded parameters), domain-specific fluent interfaces (builder pa...
استخدمه عندما تحتاج إلى مراجعة كود Java أو تحسينه أو إعادة تصميمه لجودة تصميم النوع - بما في ذلك إنشاء تسلسلات هرمية واضحة للنوع، وتطبيق اصطلاحات تسمية متسقة، والقضاء على الهوس البدائي بكائنات القيمة الخاصة بالمجال، والاستفادة من معلمات النوع العامة، وإنشاء أغلفة آمنة للكتابة، وتصميم واجهات بطلاقة، وضمان أنواع رقمية مناسبة للدقة (BigDecimal للحسابات المالية)، وتحسين تباين الكتابة من خلال الواجهات ومحاذاة توقيع الطريقة. جزء من مشروع مهارات جافا المصدر: jabrena/cursor-rules-java.