Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.

Feature Request: Interface for Builder classes #1

@brianjahnke

Description

@brianjahnke

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions