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

Create SootClass builder #1069

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

wkktoria
Copy link

As described in #1059, I've created a builder for SootClass which is based on SootMethod and SootField's builders.

Copy link
Collaborator

@swissiety swissiety left a comment

Choose a reason for hiding this comment

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

thanks for your contribution! If you like to, we would really appreciate if you could do the same for the OverridingClassSource / OverridingMethodSource so SootUp can have a testcase demonstrating the usage.

@wkktoria
Copy link
Author

Sure, I'll work on making changes to these as well.

Copy link
Collaborator

@swissiety swissiety left a comment

Choose a reason for hiding this comment

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

Thank you! As we want to create a complete OverridingClassSource making use of multiple methods at once please return the different interfaces (as an accumulated interface/step) from the with* methods (e.g. see https://www.svlada.com/step-builder-pattern/).
(applies to both of the added Builders)

We even could think about extending the API of withMethods(Set )/ withFields(Set) methods to singular withField(SootField) and collect the parameters on our own.

Return different interfaces from the with*
methods.
Return different interfaces from the with*
methods.
@wkktoria
Copy link
Author

I've changed the builders to use different interfaces as suggested, but I am not sure how to replace these methods with singular one.

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