@Override
    public KeyMetadata metadata() {
      return new KeyMetadata() {

        @Override
        public boolean isExpression() {
          return true;
        }

        @Override
        public List<Expression> keys() {
          return keys;
        }
      };
    }
Extractor based on a single member (field or method)
criteria/common/src/org/immutables/criteria/backend/KeyExtractors.java