Skip to content

Comments

feat(java): add DescriptorBuilder for easy build and copying Descriptor#2229

Merged
chaokunyang merged 3 commits intoapache:mainfrom
Hen1ng:add_descriptor_builder
May 13, 2025
Merged

feat(java): add DescriptorBuilder for easy build and copying Descriptor#2229
chaokunyang merged 3 commits intoapache:mainfrom
Hen1ng:add_descriptor_builder

Conversation

@Hen1ng
Copy link
Contributor

@Hen1ng Hen1ng commented May 13, 2025

What does this PR do?

Related issues

#2222

Does this PR introduce any user-facing change?

  • Does this PR introduce any public API change?
  • Does this PR introduce any binary protocol compatibility change?

Benchmark

@Hen1ng Hen1ng requested a review from chaokunyang as a code owner May 13, 2025 15:20
@Hen1ng Hen1ng changed the title [Java] add DescriptorBuilder for easy build and copying Descriptor feat(java): add DescriptorBuilder for easy build and copying Descriptor May 13, 2025
return this;
}

public DescriptorBuilder snakeCaseName(String snakeCaseName) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be consistent with name, when building descriptor, we set snakeCaseName automatically in the constructor.

this.furyField = builder.furyField;
}

public Descriptor copy(Method readMethod, Method writeMethod) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we also add a copyBuilder() method in Descriptor to simplify the usage. And could we add a test?

@chaokunyang chaokunyang merged commit ea979a1 into apache:main May 13, 2025
53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants