Spectrum uses Project Lombok to eliminate repetitive Java boilerplate and keep class definitions focused on logic rather than accessor plumbing. Lombok annotations are processed at compile time, so the generated methods appear in the compiledDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/spectrum3847/2026-Spectrum/llms.txt
Use this file to discover all available pages before exploring further.
.class files even though they are absent from the .java source. Understanding which annotations are in use — and why — makes reading the codebase significantly easier.
@Getter and @Setter
@Getter generates a public getFieldName() method. @Setter generates a public setFieldName(Type value) method. Both can be applied at the class level (generating accessors for every field) or at the field level (generating an accessor for one field).
Without Lombok, a two-field class requires eight lines of boilerplate:
getName(), setName(), getId(), and setId() automatically during compilation.
Chained setters with @Accessors(chain = true)
By default, Lombok’s@Setter methods return void. Setter chaining — where each setter returns this so calls can be linked — is not available unless the class is explicitly annotated with @Accessors(chain = true):
Constructor overloading
Avoid overloading constructors unless an object can be meaningfully constructed from genuinely different types of parameters. When multiple constructors are necessary, use constructor chaining (this(...)) to delegate to a single canonical constructor rather than duplicating initialization logic. For objects with many optional parameters, prefer the Builder Pattern over a growing list of overloaded constructors.
Method structure
Extract long conditionals
If anif statement spans more than roughly three conditions or lines, extract the logic into a named helper method. A well-named method communicates intent more clearly than an inline boolean expression.
Use parameters explicitly
Pass values through parameters rather than relying on implicit state. Explicit parameters make methods easier to read, test, and reuse.Avoid unnecessary loops
When a mathematical expression can replace a loop, prefer the expression. Iterating an array to derive a value that could be computed algebraically adds unnecessary complexity.JavaDoc comments
Every class and every non-trivial public method must have a JavaDoc comment with at least one sentence that starts with a third-person descriptive verb:/** ... */ syntax for JavaDoc. Describe what the class or method does, its parameters, return values, and any exceptions. GitHub Copilot can assist in generating initial JavaDoc drafts, but review generated comments for accuracy.
TODO comments
Mark incomplete or improvable code withTODO comments so they surface in the VS Code task panel:
TODO for code that is temporary, a short-term solution, or functional but known to need improvement.