skills/smithery.ai/java-best-practices

java-best-practices

SKILL.md

Java 最佳实践技能包

编码规范

命名规范

  • 类名:PascalCase(UserService)
  • 方法/变量:camelCase(getUserById)
  • 常量:UPPER_SNAKE_CASE(MAX_SIZE)
  • 包名:小写(com.example.service)

常用设计模式

单例模式(枚举实现)

public enum Singleton {
    INSTANCE;
    public void doSomething() {}
}
Installs
2
First Seen
Mar 31, 2026