return new AeshCommandContainer(
new CommandLineParserBuilder()
.processedCommand(processedCommand)
.create());
}
GroupCommandDefinition groupCommand = (GroupCommandDefinition) clazz.getAnnotation(GroupCommandDefinition.class);
if(groupCommand != null) {
ProcessedCommand processedGroupCommand = new ProcessedCommandBuilder()
.name(groupCommand.name())
.description(groupCommand.description())
.validator(groupCommand.validator())
.resultHandler(groupCommand.resultHandler())
.create();
AeshCommandContainer groupContainer;
if(clazzIsaCommand)
groupContainer = new AeshCommandContainer(
new CommandLineParserBuilder()
.processedCommand(processedGroupCommand)
.command((Command) commandObject)
.create());
else
groupContainer = new AeshCommandContainer(
new CommandLineParserBuilder()
.processedCommand(processedGroupCommand)
.create());
for(Class groupClazz : groupCommand.groupCommands()) {
Object groupInstance = ReflectionUtil.newInstance(groupClazz);
if(groupInstance instanceof Command)
groupContainer.addChild(ParserGenerator.doGenerateCommandLineParser(
groupInstance, true, true));
else