Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Interface for Builder classes #1

Open
brianjahnke opened this issue May 20, 2021 · 1 comment
Open

Feature Request: Interface for Builder classes #1

brianjahnke opened this issue May 20, 2021 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@brianjahnke
Copy link

Hi,

all builder classes share common properties, e.g. the constructor or build function.

final public AccessTokenRequestMessage build() throws ConstraintViolationException {      
    VocabUtil.getInstance().validate(accessTokenRequestMessageImpl);
    return accessTokenRequestMessageImpl;
}

I would like to propose a common interface used for all Builder classes.

Something like

public interface Builder<T>{
    T build() throws ConstraintViolationException;
}

By using this interface it would be possible to use the builder independent from the concrete type they are constructing.
This independence would mean it would be possible to implement common interactions such as error handling in a generic way.

@maboeckmann maboeckmann added enhancement New feature or request good first issue Good for newcomers labels Jun 17, 2021
@maboeckmann
Copy link
Contributor

Hi Brian,

thank you for submitting this feature request. My apologies for not replying for so long, but please be assured that we already have taken this suggestion into consideration. We have created such an interface and it will be included in the next larger update of our libraries (current time plan: 3 weeks from now).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants