From java-conventions
Tomitribe Java final keyword conventions. TRIGGER when: writing or modifying Java code in any Tomitribe project — applies final to parameters, local variables, and fields per Tomitribe coding standards. DO NOT TRIGGER when: working on non-Tomitribe projects.
npx claudepluginhub tomitribe/claude-plugins --plugin java-conventionsThis skill uses the workspace's default tool permissions.
When writing or modifying Java code in this project, apply `final` according to these conventions.
Searches, retrieves, and installs Agent Skills from prompts.chat registry using MCP tools like search_skills and get_skill. Activates for finding skills, browsing catalogs, or extending Claude.
Searches prompts.chat for AI prompt templates by keyword or category, retrieves by ID with variable handling, and improves prompts via AI. Use for discovering or enhancing prompts.
Guides agent creation for Claude Code plugins with file templates, frontmatter specs (name, description, model), triggering examples, system prompts, and best practices.
final Keyword ConventionsWhen writing or modifying Java code in this project, apply final according to these conventions.
finalEvery method parameter must be final. This includes constructors, lambda parameters, and catch blocks.
public String download(final S3File file) { ... }
public static Token decrypt(final String base64Token) { ... }
public void upload(final String customerId, final LocalDate expiration) { ... }
finalEvery local variable must be final. The only exception is a variable that is intentionally reassigned (e.g., a loop accumulator).
final LocalDate now = LocalDate.now();
final String[] parts = decrypted.split(":");
final File target = new File(destination, name);
final for immutabilityFields in Lombok @Data/@Builder classes are final by default, producing immutable objects. Only omit final when the field must be mutable (e.g., a counter or state tracker).
@Data
@Builder(builderClassName = "Builder")
public class Download {
private final File destination; // immutable
private final PrintStream out; // immutable
private int count; // intentionally mutable
}
finalAll static fields are constants and must be final.
private static final Logger LOGGER = Logger.getLogger(Signatures.class.getName());
private static final String ALGORITHM = "AES";
finalEnum instance fields are always final, and enum constructor parameters follow the same rules as method parameters.
enum Action {
DOWNLOAD("Downloading", "Downloaded");
private final String presentProgressive;
private final String past;
Action(final String presentProgressive, final String past) {
this.presentProgressive = presentProgressive;
this.past = past;
}
}
finalClasses are generally not marked final. The exception is utility classes with only static methods.
finalMethods are generally not marked final. This is not part of the project convention.