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

Allow for optionals in annotated methods #768

Open
Citymonstret opened this issue Aug 30, 2024 · 0 comments
Open

Allow for optionals in annotated methods #768

Citymonstret opened this issue Aug 30, 2024 · 0 comments

Comments

@Citymonstret
Copy link
Member

We should allow for optionals to be used in annotated arguments in place of nullable parameters. Example:

@Command("command [component]")
public void someCommand(Optional<SomeType> component) {
  // ...
}

We should be able to infer the type of the optional without any issues. We will need to consider the mapping between components and optionals both when parsing & constructing the command tree, but also when mapping the parsed values to the method parameters.

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

No branches or pull requests

1 participant