Skip to content

Improve IRequestBuilder #31

@davidmoten

Description

@davidmoten

As far as I can see, every non-abstract implementation of IRequestBuilder has these methods:
T buildRequest();
T buildRequest(final java.util.List<? extends Option> requestOptions);
where T is the return type in the implementation.
A simplification is then to move those methods to IRequestBuilder and add a generic type to IRequestBuilder corresponding to the return type (after all if there is one method that I expect to see on a RequestBuilder it is buildRequest!).
For example, this interface:
public interface IBaseAttachmentRequestBuilder extends IRequestBuilder {
IAttachmentRequest buildRequest();
IAttachmentRequest buildRequest(final java.util.List<? extends Option> requestOptions);
...
would become:
public interface IBaseAttachmentRequestBuilder extends IRequestBuilder {
...
There are some flow on effects to abstract classes like BaseRequestBuilder but I think the generic type can be added to those classes also without issue.
AB#6042

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions