getOptionByDeclaredName

Returns the option with the supplied declared name (i.e., name of the method parameter), or null if not found.

This does not take into account nested aggregations, use getNestedOptionByDeclaredName instead.