protected static class ResourceBundleWrapperRT.DefaultSearchContext extends SearchContext
Modifier and Type | Field and Description |
---|---|
protected boolean |
_ignoreCase |
protected java.util.regex.Matcher |
_lastMatcherUsed |
protected java.lang.reflect.Method |
_matcherMeth |
protected java.util.regex.Pattern |
_pattern |
protected java.lang.Throwable |
_searchCancelledBy |
static java.lang.String |
CONTAINS_KEY |
static java.lang.String |
CONTAINS_MATCH |
static java.lang.String |
CONTAINS_METADATA |
static java.lang.String |
EXACT_MATCH |
protected static java.lang.String[] |
LEGACY_SEARCH_TYPES |
static java.lang.String |
METADATA_MATCH |
searchTerm, wrapper
Constructor and Description |
---|
ResourceBundleWrapperRT.DefaultSearchContext(java.lang.Object searchTerm,
ResourceBundleWrapperRT wrapper,
java.lang.String searchTypeMeth,
boolean ignoreCase) |
Modifier and Type | Method and Description |
---|---|
java.util.Set<java.lang.String> |
findKeys() |
protected java.util.Map<java.lang.String,java.lang.String> |
getEntryMap()
Allow overrides to supply an alternate source of entries to search.
|
java.lang.Throwable |
getSearchCancelledBy() |
protected boolean |
isMatch(java.lang.String key,
java.lang.String text)
Overriding context classes can use this hook point to keep track of the
_lastMatcherUsed and the true return to keep a collection of hints to
do a replace later.
|
protected boolean |
isMatchContainsKey(java.lang.String key,
java.lang.String text) |
protected boolean |
isMatchContainsMatch(java.lang.String key,
java.lang.String text) |
protected boolean |
isMatchContainsMetadata(java.lang.String key,
java.lang.String text) |
protected boolean |
isMatchExactMatch(java.lang.String key,
java.lang.String text) |
protected boolean |
isMatchMetadataMatch(java.lang.String key,
java.lang.String text) |
protected void |
setSearchCancelledBy(java.lang.Throwable t,
java.lang.String key,
java.util.Iterator<java.lang.String> keyIter)
Allow an override class to trap on an error only, and possibly handle
recovery or restart in it's own way.
|
public static final java.lang.String EXACT_MATCH
public static final java.lang.String CONTAINS_MATCH
public static final java.lang.String METADATA_MATCH
public static final java.lang.String CONTAINS_KEY
public static final java.lang.String CONTAINS_METADATA
protected static final java.lang.String[] LEGACY_SEARCH_TYPES
protected final boolean _ignoreCase
protected java.util.regex.Pattern _pattern
protected java.util.regex.Matcher _lastMatcherUsed
protected java.lang.reflect.Method _matcherMeth
protected java.lang.Throwable _searchCancelledBy
public ResourceBundleWrapperRT.DefaultSearchContext(java.lang.Object searchTerm, ResourceBundleWrapperRT wrapper, java.lang.String searchTypeMeth, boolean ignoreCase)
protected java.util.Map<java.lang.String,java.lang.String> getEntryMap()
getEntryMap
in class SearchContext
public java.util.Set<java.lang.String> findKeys()
findKeys
in class SearchContext
protected void setSearchCancelledBy(java.lang.Throwable t, java.lang.String key, java.util.Iterator<java.lang.String> keyIter)
t
- This caused the search to cancelkey
- The key being processed at the timekeyIter
- the overall iterator of keyspublic java.lang.Throwable getSearchCancelledBy()
protected boolean isMatch(java.lang.String key, java.lang.String text) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
isMatch
in class SearchContext
key
- the current item keytext
- the current item valuejava.lang.IllegalAccessException
- if the matcher method is not appropriatejava.lang.reflect.InvocationTargetException
- if the matcher method had a runtime faultprotected boolean isMatchContainsKey(java.lang.String key, java.lang.String text)
protected boolean isMatchExactMatch(java.lang.String key, java.lang.String text)
protected boolean isMatchContainsMatch(java.lang.String key, java.lang.String text)
protected boolean isMatchMetadataMatch(java.lang.String key, java.lang.String text)
protected boolean isMatchContainsMetadata(java.lang.String key, java.lang.String text)