Feature request: A modifier annotation for data classes to provide a non arg constructor on JVM

In really, there’s one way to prevent that java code call this constructor.

→ Just set it private.

So, this become accessible only by reflection:

Constructor constructor = Person.class.getDeclaredConstructor(new Class[0]);
constructor.setAccessible(true);
Person person = constructor.newInstance(new Object[0]);