@Test public void addPrefix() throws Exception { assertNull(AnalyzerGuru.find("unlikely_prefix.foo")); AnalyzerFactory faf = AnalyzerGuru.findFactory(ShAnalyzerFactory.class.getName()); assertSame(AnalyzerGuru.find("myscript.sh"), faf); AnalyzerGuru.addPrefix("UNLIKELY_PREFIX", faf); assertSame(ShAnalyzerFactory.class, AnalyzerGuru.find("unlikely_prefix.foo").getClass()); AnalyzerGuru.addPrefix("UNLIKELY_PREFIX", null); assertNull(AnalyzerGuru.find("unlikely_prefix.foo")); }
public static void addPrefix(String prefix, AnalyzerFactory factory) { AnalyzerFactory oldFactory; if (factory == null) { oldFactory = pre.remove(prefix); langMap.exclude(prefix); } else { oldFactory = pre.put(prefix, factory); langMap.add(prefix, factory.getAnalyzer().getCtagsLang()); } if (factoriesDifferent(factory, oldFactory)) { addCustomizationKey("p:" + prefix); } }
AnalyzerGuru { public static void addPrefix(String prefix, AnalyzerFactory factory) { AnalyzerFactory oldFactory; if (factory == null) { oldFactory = pre.remove(prefix); langMap.exclude(prefix); } else { oldFactory = pre.put(prefix, factory); langMap.add(prefix, factory.getAnalyzer().getCtagsLang()); } if (factoriesDifferent(factory, oldFactory)) { addCustomizationKey("p:" + prefix); } } }
AnalyzerGuru { public static void addPrefix(String prefix, AnalyzerFactory factory) { AnalyzerFactory oldFactory; if (factory == null) { oldFactory = pre.remove(prefix); langMap.exclude(prefix); } else { oldFactory = pre.put(prefix, factory); langMap.add(prefix, factory.getAnalyzer().getCtagsLang()); } if (factoriesDifferent(factory, oldFactory)) { addCustomizationKey("p:" + prefix); } }  }
AnalyzerGuru { public static void addPrefix(String prefix, AnalyzerFactory factory) { AnalyzerFactory oldFactory; if (factory == null) { oldFactory = pre.remove(prefix); langMap.exclude(prefix); } else { oldFactory = pre.put(prefix, factory); langMap.add(prefix, factory.getAnalyzer().getCtagsLang()); } if (factoriesDifferent(factory, oldFactory)) { addCustomizationKey("p:" + prefix); } }  static long getVersionNo(); static long getAnalyzerVersionNo(String fileTypeName); static Map<String, Long> getAnalyzersVersionNos(); static Map<String, AnalyzerFactory> getExtensionsMap(); static Map<String, AnalyzerFactory> getPrefixesMap(); static Map<String, AnalyzerFactory> getMagicsMap(); static List<Matcher> getAnalyzerFactoryMatchers(); static Map<String, String> getfileTypeDescriptions(); List<AnalyzerFactory> getAnalyzerFactories(); static void addPrefix(String prefix, AnalyzerFactory factory); static void addExtension(String extension, AnalyzerFactory factory); static LangMap getLangMap(); static AbstractAnalyzer getAnalyzer(); static AbstractAnalyzer getAnalyzer(String fileTypeName); static AbstractAnalyzer getAnalyzer(InputStream in, String file); static void returnAnalyzers(); void populateDocument(Document doc, File file, String path,
        AbstractAnalyzer fa, Writer xrefOut); static void writeXref(AnalyzerFactory factory, Reader in,
            Writer out, Definitions defs,
            Annotation annotation, Project project); static void writeDumpedXref(String contextPath,
            AnalyzerFactory factory, Reader in, Writer out,
            Definitions defs, Annotation annotation, Project project); static AbstractAnalyzer.Genre getGenre(String file); static AbstractAnalyzer.Genre getGenre(InputStream in); static AbstractAnalyzer.Genre getGenre(AnalyzerFactory factory); static AnalyzerFactory findByFileTypeName(String fileTypeName); static AnalyzerFactory findFactory(String factoryClassName); static Class<?> getFactoryClass(String simpleName); static AnalyzerFactory find(InputStream in, String file); static AnalyzerFactory find(String file); static AnalyzerFactory find(InputStream in); }
AnalyzerGuru { public static void addPrefix(String prefix, AnalyzerFactory factory) { AnalyzerFactory oldFactory; if (factory == null) { oldFactory = pre.remove(prefix); langMap.exclude(prefix); } else { oldFactory = pre.put(prefix, factory); langMap.add(prefix, factory.getAnalyzer().getCtagsLang()); } if (factoriesDifferent(factory, oldFactory)) { addCustomizationKey("p:" + prefix); } }  static long getVersionNo(); static long getAnalyzerVersionNo(String fileTypeName); static Map<String, Long> getAnalyzersVersionNos(); static Map<String, AnalyzerFactory> getExtensionsMap(); static Map<String, AnalyzerFactory> getPrefixesMap(); static Map<String, AnalyzerFactory> getMagicsMap(); static List<Matcher> getAnalyzerFactoryMatchers(); static Map<String, String> getfileTypeDescriptions(); List<AnalyzerFactory> getAnalyzerFactories(); static void addPrefix(String prefix, AnalyzerFactory factory); static void addExtension(String extension, AnalyzerFactory factory); static LangMap getLangMap(); static AbstractAnalyzer getAnalyzer(); static AbstractAnalyzer getAnalyzer(String fileTypeName); static AbstractAnalyzer getAnalyzer(InputStream in, String file); static void returnAnalyzers(); void populateDocument(Document doc, File file, String path,
        AbstractAnalyzer fa, Writer xrefOut); static void writeXref(AnalyzerFactory factory, Reader in,
            Writer out, Definitions defs,
            Annotation annotation, Project project); static void writeDumpedXref(String contextPath,
            AnalyzerFactory factory, Reader in, Writer out,
            Definitions defs, Annotation annotation, Project project); static AbstractAnalyzer.Genre getGenre(String file); static AbstractAnalyzer.Genre getGenre(InputStream in); static AbstractAnalyzer.Genre getGenre(AnalyzerFactory factory); static AnalyzerFactory findByFileTypeName(String fileTypeName); static AnalyzerFactory findFactory(String factoryClassName); static Class<?> getFactoryClass(String simpleName); static AnalyzerFactory find(InputStream in, String file); static AnalyzerFactory find(String file); static AnalyzerFactory find(InputStream in); static final FieldType string_ft_stored_nanalyzed_norms; static final FieldType string_ft_nstored_nanalyzed_norms; }