MetaData existed before JDK 1.5
Look at definition of Metadata:
The J2SE 1.5 metadata feature is a facility that allows developers to annotate their code so that tools can generate boilerplate code (e.g stub generation to remote procedure calls) as directed by annotations.
And think about those interfaces: Serializable and Cloneable.
Those interfaces are empty.
They contains nothing.
But they are used to give directive to the compiler to generate the correct code.
They are working like metadata but are recognized directly by the compiler.
My questions are the following:
Will we see a javac that will recognize standard metatag and generate directly the .class file(s) as it recognizes now the Cloneable and Serializable, that are ancestors of metatag.
Serializable and Cloneable metadata are implemented as interface. And then, they have a clear Javadoc page, explaining exactly their meaning, etc.
- Can we do the same with metadata ? When I look at examples, I haven't yet seen it it possible. And I find it's a bad thing.