static KeyLookupAnalyzer fromExtractor(KeyExtractor extractor) {
    Objects.requireNonNull(extractor, "extractor");
    KeyExtractor.KeyMetadata metadata = extractor.metadata();
    if (!(metadata.isExpression() && metadata.isKeyDefined()) || metadata.keys().size() > 1) {
      return disabled();
    }

    Optional<Path> path = Visitors.maybePath(metadata.keys().get(0));
    return path.map(KeyLookupAnalyzer::forPath).orElse(disabled());
  }
Create analyzer based on existing extractor. Currently only
single key is supported and key expression has to be {@link Path}.
criteria/geode/src/org/immutables/criteria/geode/KeyLookupAnalyzer.java