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

Add run/call static methods that accept an IFactory #400

Closed
remkop opened this issue Jun 30, 2018 · 0 comments
Closed

Add run/call static methods that accept an IFactory #400

remkop opened this issue Jun 30, 2018 · 0 comments

Comments

@remkop
Copy link
Owner

remkop commented Jun 30, 2018

To facilitate Micronaut integration (#399), add the following methods:

static <C extends Callable<T>, T> T call(Class<C>, IFactory, String...) {}
static <C extends Callable<T>, T> T call(Class<C>, IFactory, PrintStream, String...) {}
static <C extends Callable<T>, T> T call(Class<C>, IFactory, PrintStream, Help.Ansi, String...) {}
static <C extends Callable<T>, T> T call(Class<C>, IFactory, PrintStream, PrintStream, Help.Ansi, String...) {}
static <C extends Runnable> void run(Class<C>, IFactory, String...) {}
static <C extends Runnable> void run(Class<C>, IFactory, PrintStream, String...) {}
static <C extends Runnable> void run(Class<C>, IFactory, PrintStream, Help.Ansi, String...) {}
static <C extends Runnable> void run(Class<C>, IFactory, PrintStream, PrintStream, Help.Ansi, String...) {}

Also, instead of unconditionally creating a proxy for interfaces with annotated methods (in CommandLine.Model.CommandReflection.extractCommandSpec), first try to look up the interface in the factory, and create a proxy if the lookup fails.

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

No branches or pull requests

1 participant