mirror of https://github.com/apache/lucene.git
LUCENE-5170: Remove deprecated code
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1513914 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
8bac549ce3
commit
8376eddf50
|
@ -389,21 +389,7 @@ public abstract class Analyzer implements Closeable {
|
||||||
* A predefined {@link ReuseStrategy} that reuses the same components for
|
* A predefined {@link ReuseStrategy} that reuses the same components for
|
||||||
* every field.
|
* every field.
|
||||||
*/
|
*/
|
||||||
public static final ReuseStrategy GLOBAL_REUSE_STRATEGY = new GlobalReuseStrategy();
|
public static final ReuseStrategy GLOBAL_REUSE_STRATEGY = new ReuseStrategy() {
|
||||||
|
|
||||||
/**
|
|
||||||
* Implementation of {@link ReuseStrategy} that reuses the same components for
|
|
||||||
* every field.
|
|
||||||
* @deprecated This implementation class will be hidden in Lucene 5.0.
|
|
||||||
* Use {@link Analyzer#GLOBAL_REUSE_STRATEGY} instead!
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public final static class GlobalReuseStrategy extends ReuseStrategy {
|
|
||||||
|
|
||||||
/** Sole constructor. (For invocation by subclass constructors, typically implicit.)
|
|
||||||
* @deprecated Don't create instances of this class, use {@link Analyzer#GLOBAL_REUSE_STRATEGY} */
|
|
||||||
@Deprecated
|
|
||||||
public GlobalReuseStrategy() {}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TokenStreamComponents getReusableComponents(Analyzer analyzer, String fieldName) {
|
public TokenStreamComponents getReusableComponents(Analyzer analyzer, String fieldName) {
|
||||||
|
@ -414,27 +400,13 @@ public abstract class Analyzer implements Closeable {
|
||||||
public void setReusableComponents(Analyzer analyzer, String fieldName, TokenStreamComponents components) {
|
public void setReusableComponents(Analyzer analyzer, String fieldName, TokenStreamComponents components) {
|
||||||
setStoredValue(analyzer, components);
|
setStoredValue(analyzer, components);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A predefined {@link ReuseStrategy} that reuses components per-field by
|
* A predefined {@link ReuseStrategy} that reuses components per-field by
|
||||||
* maintaining a Map of TokenStreamComponent per field name.
|
* maintaining a Map of TokenStreamComponent per field name.
|
||||||
*/
|
*/
|
||||||
public static final ReuseStrategy PER_FIELD_REUSE_STRATEGY = new PerFieldReuseStrategy();
|
public static final ReuseStrategy PER_FIELD_REUSE_STRATEGY = new ReuseStrategy() {
|
||||||
|
|
||||||
/**
|
|
||||||
* Implementation of {@link ReuseStrategy} that reuses components per-field by
|
|
||||||
* maintaining a Map of TokenStreamComponent per field name.
|
|
||||||
* @deprecated This implementation class will be hidden in Lucene 5.0.
|
|
||||||
* Use {@link Analyzer#PER_FIELD_REUSE_STRATEGY} instead!
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public static class PerFieldReuseStrategy extends ReuseStrategy {
|
|
||||||
|
|
||||||
/** Sole constructor. (For invocation by subclass constructors, typically implicit.)
|
|
||||||
* @deprecated Don't create instances of this class, use {@link Analyzer#PER_FIELD_REUSE_STRATEGY} */
|
|
||||||
@Deprecated
|
|
||||||
public PerFieldReuseStrategy() {}
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
@Override
|
@Override
|
||||||
|
@ -453,6 +425,6 @@ public abstract class Analyzer implements Closeable {
|
||||||
}
|
}
|
||||||
componentsPerField.put(fieldName, components);
|
componentsPerField.put(fieldName, components);
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue