Skip to content

[WIP] Refactor AgGridEnterpriseOptions to fluent builder pattern#1

Closed
Copilot wants to merge 1 commit intomasterfrom
copilot/inland-tern
Closed

[WIP] Refactor AgGridEnterpriseOptions to fluent builder pattern#1
Copilot wants to merge 1 commit intomasterfrom
copilot/inland-tern

Conversation

Copy link

Copilot AI commented Dec 2, 2025

Coding agent has begun work on Refactor AgGridEnter... and will update this pull request as work progresses.

Original prompt

Refactor AgGridEnterpriseOptions to fluent builder pattern with @JspecifyNullable

Overview

Refactor the AgGridEnterpriseOptions class (61 setters + 83 getters = 144 methods) to implement a fluent builder pattern while properly applying JSpecify null-safety annotations.

Current State

  • File: src/main/java/com/jwebmp/plugins/aggridenterprise/options/AgGridEnterpriseOptions.java
  • 61 setter methods that return void
  • 83 getter methods
  • Methods need @JspecifyNullable annotations for proper null-safety

Requirements

1. Fluent Builder Pattern

  • Convert all void setters to return this (the class instance)
  • This enables method chaining: options.setProperty1(value1).setProperty2(value2)
  • Maintain backward compatibility by keeping existing getter/setter signatures

2. JSpecify Null-Safety Annotations

  • Apply @JspecifyNullable to ALL setter method parameters
  • Apply @JspecifyNullable to return types where methods can return null values
  • Apply @JspecifyNullable to getter return types for properties that may be null
  • Ensure proper import: import org.jspecify.annotations.Nullable;

3. Implementation Strategy

Since there are 144 methods, use programmatic/template-based approach:

  • Generate updated method bodies in batch
  • Maintain consistent formatting and documentation
  • Use IDE refactoring where possible to ensure no breakage

4. Testing

  • Run existing tests to ensure no functionality is broken
  • Verify return types are compatible with existing code
  • Check that method chaining works as expected

Success Criteria

✓ All 61 setters return this
✓ All methods have appropriate @JspecifyNullable annotations
✓ All existing tests pass
✓ Method chaining syntax is enabled (fluent API)
✓ No breaking changes to public API (setters still callable as before)
✓ Documentation/Javadoc updated where needed

Created from VS Code via the GitHub Pull Request extension.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@GedMarc GedMarc closed this Dec 2, 2025
@GedMarc GedMarc deleted the copilot/inland-tern branch December 2, 2025 16:12
Copilot AI requested a review from GedMarc December 2, 2025 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants