public CommandCodeGenerator getCodeGenerator()

in src/main/java/org/apache/activemq/nms/openwire/tool/commands/CommandCodeGeneratorsFactory.java [35:57]


    public CommandCodeGenerator getCodeGenerator( String className ) {

        Class<?> generatorClass = null;

        try {
            generatorClass = Class.forName( "org.apache.activemq.nms.openwire.tool.commands." + className + "Generator" );
        } catch (ClassNotFoundException e) {
            return new CommandClassGenerator();
        }

        CommandCodeGenerator generator;
        try {
            generator = (CommandCodeGenerator) generatorClass.newInstance();
        } catch (InstantiationException e) {
            e.printStackTrace();
            return null;
        } catch (IllegalAccessException e) {
            e.printStackTrace();
            return null;
        }

        return generator;
    }