@Test public void testCreateRegexSourceCodeAnalyzer() { SourceCodeAnalyzer analyzer = factory.createSourceCodeAnalyzer(REGEX_TYPE); assertTrue(analyzer instanceof RegexAnalyzer); }
public SourceCodeAnalyzer createSourceCodeAnalyzer(String type) { if (type.equals("regex")) { return new RegexAnalyzer(); } else if (type.equals("strcomp")) { return new StringComparisonAnalyzer(); } else { return new NullAnalyzer(); } }
SourceCodeAnalyzerFactory { public SourceCodeAnalyzer createSourceCodeAnalyzer(String type) { if (type.equals("regex")) { return new RegexAnalyzer(); } else if (type.equals("strcomp")) { return new StringComparisonAnalyzer(); } else { return new NullAnalyzer(); } } }
SourceCodeAnalyzerFactory { public SourceCodeAnalyzer createSourceCodeAnalyzer(String type) { if (type.equals("regex")) { return new RegexAnalyzer(); } else if (type.equals("strcomp")) { return new StringComparisonAnalyzer(); } else { return new NullAnalyzer(); } }  }
SourceCodeAnalyzerFactory { public SourceCodeAnalyzer createSourceCodeAnalyzer(String type) { if (type.equals("regex")) { return new RegexAnalyzer(); } else if (type.equals("strcomp")) { return new StringComparisonAnalyzer(); } else { return new NullAnalyzer(); } }  SourceCodeAnalyzer createSourceCodeAnalyzer(String type); }
SourceCodeAnalyzerFactory { public SourceCodeAnalyzer createSourceCodeAnalyzer(String type) { if (type.equals("regex")) { return new RegexAnalyzer(); } else if (type.equals("strcomp")) { return new StringComparisonAnalyzer(); } else { return new NullAnalyzer(); } }  SourceCodeAnalyzer createSourceCodeAnalyzer(String type);  }