source: branches/autoquest-core-tasktrees-alignment/src/main/java/de/ugoe/cs/autoquest/tasktrees/alignment/algorithms/AlignmentAlgorithmFactory.java @ 1733

Last change on this file since 1733 was 1733, checked in by rkrimmel, 10 years ago

Used Eclipse code cleanup

File size: 772 bytes
Line 
1package de.ugoe.cs.autoquest.tasktrees.alignment.algorithms;
2
3public class AlignmentAlgorithmFactory {
4
5        public static AlignmentAlgorithm create() {
6                Class<?> newclass;
7                Object object = null;
8                try {
9                        newclass = Class.forName(algorithmclass);
10                        object = newclass.newInstance();
11
12                } catch (ClassNotFoundException | SecurityException
13                                | InstantiationException | IllegalAccessException
14                                | IllegalArgumentException e) {
15                        e.printStackTrace();
16                }
17                return (AlignmentAlgorithm) object;
18        }
19
20        public static void setDefaultAlgorithm(String algorithmname) {
21                // TODO: check for valid algorihm class names here
22                algorithmclass = algorithmname;
23        }
24
25        private static String algorithmclass = "de.ugoe.cs.autoquest.tasktrees.alignment.algorithms.SmithWatermanRepeated";
26}
Note: See TracBrowser for help on using the repository browser.