Skip to content

Allow for optionals in annotated methods #768

Description

@Citymonstret

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions