return hasSpellCheckMapping(compass.getConfig());
}
public static boolean hasSpellCheckMapping(CompassConfiguration compassConfiguration) {
try {
FieldInvoker invoker = new FieldInvoker(CompassConfiguration.class, "mappingBinding").prepare();
CompassMappingBinding mappingBinding = (CompassMappingBinding) invoker.get(compassConfiguration);
if (mappingBinding == null) {
return false;
}
invoker = new FieldInvoker(CompassMappingBinding.class, "mapping").prepare();
CompassMapping mapping = (CompassMapping) invoker.get(mappingBinding);
ResourceMapping[] mappings = mapping.getRootMappings();
for (int i = 0; i < mappings.length; i++) {
ResourceMapping resourceMapping = mappings[i];
if (resourceMapping.getSpellCheck().equals(SpellCheck.INCLUDE)) {