Object (Object o, FromNativeContext fromNativeContext) { return switch (Native.LONG_SIZE) { case 4 -> new CGFloat((Float)o); case 8 -> new CGFloat((Double)o); default -> throw new IllegalStateException(); }; }