private static AnalyzerReference luceneAnalyzerReferenceFromDefinition( org.hibernate.search.annotations.Analyzer analyzerAnn, ConfigContext configContext) { String definition = analyzerAnn == null ? "" : analyzerAnn.definition(); if (StringHelper.isEmpty(definition)) { return null; } return configContext.buildLazyLuceneAnalyzerReference(definition); }
public static AnalyzerReference getAnalyzerReference( org.hibernate.search.annotations.Analyzer analyzerAnn, ConfigContext configContext, boolean isRemote) { Class<?> analyzerClass = analyzerAnn == null ? void.class : analyzerAnn.impl(); if (isRemote) { return remoteAnalyzerReferenceFromDefinition(analyzerAnn, configContext); } else { if (analyzerClass == void.class) { return luceneAnalyzerReferenceFromDefinition(analyzerAnn, configContext); } else { return luceneAnalyzerReferenceFromClass(configContext, analyzerClass); } } }