Why not just use code (generated if required) to read xml or json for each class? That way it is clear, in the source code and can perform other transformations as required.
Yes. It's what the Java world was before annotations became a thing.
> Why not just use code (generated if required) to read xml or json for each class?
Because it didn't happen that way, because Java is way too verbose for that, and because "imperative declarations" are a horrible thing.
Perhaps the culture is stronger than the language though.
Why not just use code (generated if required) to read xml or json for each class? That way it is clear, in the source code and can perform other transformations as required.