Search in sources :

Example 1 with OptionParser

use of com.ontology2.centipede.parser.OptionParser in project centipede by paulhoule.

the class CentipedeShell method parseOptions.

private CentipedeShellOptions parseOptions(String[] arguments) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
    ApplicationContext bootstrapContext = newContext(getBootstrapApplicationContextPath());
    OptionParser parser = new OptionParser(CentipedeShellOptions.class);
    wireupOptionParser(bootstrapContext, parser);
    closeContext(bootstrapContext);
    return (CentipedeShellOptions) parser.parse(newArrayList(arguments));
}
Also used : ApplicationContext(org.springframework.context.ApplicationContext) AbstractApplicationContext(org.springframework.context.support.AbstractApplicationContext) ClassPathXmlApplicationContext(org.springframework.context.support.ClassPathXmlApplicationContext) OptionParser(com.ontology2.centipede.parser.OptionParser)

Aggregations

OptionParser (com.ontology2.centipede.parser.OptionParser)1 ApplicationContext (org.springframework.context.ApplicationContext)1 AbstractApplicationContext (org.springframework.context.support.AbstractApplicationContext)1 ClassPathXmlApplicationContext (org.springframework.context.support.ClassPathXmlApplicationContext)1