Skip to content

Builder interceptor #5578

@trentjeff

Description

@trentjeff

There is a need to optionally intercept a builder before it is built. This is to allow assigning default or overriding values based upon various conditions, perhaps on other attributes, and perhaps using user-defined context/inputs.

Perhaps something like this added to the build method:
builder = interceptor.intercept(builder);

What complicates matters a bit is the interceptor might be a combination of a user-defined interception, or a service/bean-defined interception. The main use case, however, is that the bean interface writer wants to ensure the integrity of the bean values - this is the main use case we should support.

More thought will be needed on how we implement this, through a combination of attributes on the Builder annotation, etc.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Closed

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions