mkolodzej/javamatt icon
public
Published on 4/2/2025
JavaMatts

Rules
Models
Context
anthropic Claude 3.7 Sonnet model icon

Claude 3.7 Sonnet

anthropic

200kinput·8.192koutput
anthropic Claude 3.5 Sonnet model icon

Claude 3.5 Sonnet

anthropic

200kinput·8.192koutput
mistral Codestral model icon

Codestral

mistral

voyage voyage-code-3 model icon

voyage-code-3

voyage

voyage Voyage AI rerank-2 model icon

Voyage AI rerank-2

voyage

mistral CodestralFree model icon

CodestralFree

mistral

xAI Grok 2 model icon

Grok 2

xAI

- # ALWAYS review the file structure prior to making a refactor, especially if it's a big refactor.

## Build & Development Commands
- Utilize a build automation tool like Maven or Gradle for project management and building.
- For development builds, consider skipping tests to speed up the process when necessary.
- Regularly update dependencies to ensure the project uses the latest stable versions.
- Generate documentation (e.g., JavaDoc) to maintain clear and accessible code references.
- Compile the project to check for issues without installing it.

## Testing Guidelines
- Implement unit tests for all classes to ensure functionality.
- Cover all public methods and constructors with tests.
- Organize tests in a corresponding package structure under `src/test/java`.
- Name test classes using the pattern `[ClassName]Test.java` for clarity.
- Use descriptive names for test methods that reflect the scenarios being tested.
- Ensure both positive and negative test cases are included for comprehensive coverage.

## Code Style & Guidelines 
- Adhere to the Java Bean conventions, including proper getters and setters.
- Maintain a logical package structure to separate domain models by functionality.
- Provide both default and parameterized constructors for classes.
- Use consistent naming conventions (camelCase) for fields and methods.
- Ensure each class has a single responsibility to promote maintainability.
- Implement validation logic in setters where applicable.
- Enforce encapsulation by using private fields with public accessors.
- Choose appropriate data types, such as using Lists instead of arrays when order matters.

## Documentation Guidelines 
- Include JavaDoc comments for all public classes and methods, detailing parameters and return values.
- Provide class-level documentation to explain the purpose of each domain object.
- Use `@author` and `@version` tags to track ownership and changes.
- Document any constraints or validation rules associated with fields.
- Keep comments updated to reflect any code modifications.
- Provide usage examples for complex domain objects to aid understanding.
- Add package-level documentation in `package-info.java` files for clarity.
Javadoc21 documentationhttps://docs.oracle.com/en/java/javase/21/docs/api/index.html
Java 17https://docs.oracle.com/en/java/javase/17/

Prompts

Learn more

No Prompts configured

Context

Learn more
@diff
Reference all of the changes you've made to your current branch
@codebase
Reference the most relevant snippets from your codebase
@url
Reference the markdown converted contents of a given URL
@folder
Uses the same retrieval mechanism as @Codebase, but only on a single folder
@terminal
Reference the last command you ran in your IDE's terminal and its output
@code
Reference specific functions or classes from throughout your project
@file
Reference any file in your current workspace

No Data configured

MCP Servers

Learn more

Memory

npx -y @modelcontextprotocol/server-memory