public static DoccatFactory create(String subclassName, FeatureGenerator[] featureGenerators) throws InvalidFormatException { if (subclassName == null) { // will create the default factory return new DoccatFactory(featureGenerators); } try { DoccatFactory theFactory = ExtensionLoader.instantiateExtension( DoccatFactory.class, subclassName); theFactory.init(featureGenerators); return theFactory; } catch (Exception e) { String msg = "Could not instantiate the " + subclassName + ". The initialization throw an exception."; System.err.println(msg); e.printStackTrace(); throw new InvalidFormatException(msg, e); } }
public static DoccatFactory create(String subclassName, FeatureGenerator[] featureGenerators) throws InvalidFormatException { if (subclassName == null) { // will create the default factory return new DoccatFactory(featureGenerators); } try { DoccatFactory theFactory = ExtensionLoader.instantiateExtension( DoccatFactory.class, subclassName); theFactory.init(featureGenerators); return theFactory; } catch (Exception e) { String msg = "Could not instantiate the " + subclassName + ". The initialization throw an exception."; System.err.println(msg); e.printStackTrace(); throw new InvalidFormatException(msg, e); } }
public static DoccatFactory create(String subclassName, FeatureGenerator[] featureGenerators) throws InvalidFormatException { if (subclassName == null) { // will create the default factory return new DoccatFactory(featureGenerators); } try { DoccatFactory theFactory = ExtensionLoader.instantiateExtension( DoccatFactory.class, subclassName); theFactory.init(featureGenerators); return theFactory; } catch (Exception e) { String msg = "Could not instantiate the " + subclassName + ". The initialization throw an exception."; System.err.println(msg); e.printStackTrace(); throw new InvalidFormatException(msg, e); } }