Source:
public static ObjectType getObjectType(Object value) { if (value instanceof String) { return ObjectType.String; } else if (value instanceof Long) { return ObjectType.Long; } else if (value instanceof Double) { return ObjectType.Double; } else if (value instanceof DoubleArrayList) { return ObjectType.DoubleArrayList; } else if (value instanceof AvgPair) { return ObjectType.AvgPair; } else if (value instanceof MinMaxRangePair) { return ObjectType.MinMaxRangePair; } else if (value instanceof HyperLogLog) { return ObjectType.HyperLogLog; } else if (value instanceof QuantileDigest) { return ObjectType.QuantileDigest; } else if (value instanceof Map) { return ObjectType.Map; } else if (value instanceof IntSet) { return ObjectType.IntSet; } else if (value instanceof TDigest) { return ObjectType.TDigest; } else if (value instanceof DistinctTable) { return ObjectType.DistinctTable; } else if (value instanceof Sketch) { return ObjectType.DataSketch; } else if (value instanceof Geometry) { return ObjectType.Geometry; } else if (value instanceof RoaringBitmap) { return ObjectType.RoaringBitmap; } else if (value instanceof LongSet) { return ObjectType.LongSet; } else if (value instanceof it.unimi.dsi.fastutil.floats.FloatSet) { return ObjectType.FloatSet; } else if (value instanceof it.unimi.dsi.fastutil.doubles.DoubleSet) { return ObjectType.DoubleSet; } else if (value instanceof ObjectSet) { return ObjectType.BytesSet; } else { throw new IllegalArgumentException("Unsupported type of value: " + value.getClass().getSimpleName()); } }

Target:
public static ObjectType getObjectType(Object value) { if (value instanceof String) { return ObjectType.String; } else if (value instanceof Long) { return ObjectType.Long; } else if (value instanceof Double) { return ObjectType.Double; } else if (value instanceof DoubleArrayList) { return ObjectType.DoubleArrayList; } else if (value instanceof AvgPair) { return ObjectType.AvgPair; } else if (value instanceof MinMaxRangePair) { return ObjectType.MinMaxRangePair; } else if (value instanceof HyperLogLog) { return ObjectType.HyperLogLog; } else if (value instanceof QuantileDigest) { return ObjectType.QuantileDigest; } else if (value instanceof Map) { return ObjectType.Map; } else if (value instanceof IntSet) { return ObjectType.IntSet; } else if (value instanceof TDigest) { return ObjectType.TDigest; } else if (value instanceof DistinctTable) { return ObjectType.DistinctTable; } else if (value instanceof Sketch) { return ObjectType.DataSketch; } else if (value instanceof Geometry) { return ObjectType.Geometry; } else if (value instanceof RoaringBitmap) { return ObjectType.RoaringBitmap; } else if (value instanceof LongSet) { return ObjectType.LongSet; } else if (value instanceof FloatSet) { return ObjectType.FloatSet; } else if (value instanceof DoubleSet) { return ObjectType.DoubleSet; } else if (value instanceof ObjectSet) { ObjectSet objectSet = (ObjectSet) value; if (objectSet.isEmpty() || objectSet.iterator().next() instanceof String) { return ObjectType.StringSet; } else { return ObjectType.BytesSet; } } else { throw new IllegalArgumentException("Unsupported type of value: " + value.getClass().getSimpleName()); } }