Skip to content

CAUSEWAY-4044: Work towards immutable ObjectSpecification - #3697

Draft
andi-huber wants to merge 18 commits into
mainfrom
4044-stable.objspec
Draft

CAUSEWAY-4044: Work towards immutable ObjectSpecification#3697
andi-huber wants to merge 18 commits into
mainfrom
4044-stable.objspec

Conversation

@andi-huber

@andi-huber andi-huber commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Motivation: The current ObjectSpecification implementation is fragile and leads to a non deterministic outcome of the Metamodel inspection.

  • Factor out Member creation into factory classes
  • Facet caching is in conflict with lazy initialization. Query for Facets that are not populated yet can taint the cache and lead to an incorrect Metamodel.
  • Unclear policy, as to whether we need to lookup the type hierarchy for Facets. (see Hierarchical)
  • Mixins may be discovered only after the prior known set of mixins had already been added to object specifications.
  • To yield immutability perhaps use the Builder design pattern. (namely an ObjectSpecificationBuilder)

Task-Url: https://issues.apache.org/jira/browse/CAUSEWAY-4044

@andi-huber andi-huber self-assigned this Jul 29, 2026
@andi-huber
andi-huber force-pushed the 4044-stable.objspec branch from af83569 to 65522a7 Compare August 3, 2026 05:07
@andi-huber
andi-huber force-pushed the 4044-stable.objspec branch from a23faee to 4ec0a77 Compare August 4, 2026 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant