Code to configure custom retries in Temporal with retry delays and max retries

Hey! I want to configure custom retry policy through my java code. I want to use retry delays and max retries given by users and execute the workflow based on it,
Please help me with the code

You can define retry options when you create your activity stub see here for example. Is that what you are looking for?