Skip to content

Commit

Permalink
Using generics from Aesh classes
Browse files Browse the repository at this point in the history
  • Loading branch information
gastaldi committed Oct 22, 2015
1 parent 00ea61d commit d390323
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ protected AbstractShellInteraction(CommandController controller, ShellContext sh
this.commandLineUtil = commandLineUtil;
}

protected abstract CommandLineParser getParser(ShellContext shellContext, String completeLine,
protected abstract CommandLineParser<?> getParser(ShellContext shellContext, String completeLine,
CommandAdapter command) throws Exception;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ public CommandLineUtil(AddonRegistry addonRegistry)
this.converterFactory = addonRegistry.getServices(ConverterFactory.class).get();
}

public CommandLineParser generateParser(CommandAdapter command, CommandController commandController,
public CommandLineParser<?> generateParser(CommandAdapter command, CommandController commandController,
ShellContext shellContext,
Map<String, InputComponent<?, ?>> inputs)
{
ProcessedCommand processedCommand = generateCommand(command, commandController, shellContext, inputs);
ProcessedCommand<?> processedCommand = generateCommand(command, commandController, shellContext, inputs);
return new ForgeCommandLineParser(processedCommand, this, inputs, shellContext);
}

private ProcessedCommand generateCommand(final CommandAdapter commandAdapter,
private ProcessedCommand<?> generateCommand(final CommandAdapter commandAdapter,
final CommandController commandController, final ShellContext shellContext,
final Map<String, InputComponent<?, ?>> inputs)
{
Expand Down Expand Up @@ -155,7 +155,7 @@ public boolean isActivated(ProcessedCommand processedCommand)
}
}

public Map<String, InputComponent<?, ?>> populateUIInputs(CommandLine commandLine,
public Map<String, InputComponent<?, ?>> populateUIInputs(CommandLine<?> commandLine,
Map<String, InputComponent<?, ?>> inputs, UIContext context)
{
Map<String, InputComponent<?, ?>> populatedInputs = new LinkedHashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@
class ForgeCommandContainer implements CommandContainer
{
private final ShellContextImpl context;
private final CommandLineParser parser;
private final CommandLineParser<?> parser;
private final Command<CommandInvocation> command;

ForgeCommandContainer(ShellContextImpl context, CommandLineParser parser,
ForgeCommandContainer(ShellContextImpl context, CommandLineParser<?> parser,
Command<CommandInvocation> command)
{
this.context = context;
Expand All @@ -51,7 +51,7 @@ public void close() throws Exception
}

@Override
public CommandLineParser getParser()
public CommandLineParser<?> getParser()
{
return parser;
}
Expand Down

0 comments on commit d390323

Please sign in to comment.