Ø Annotation is meant to remove the boiler-plate code.
Ø Earlier annotation types were transient, @deprecated javadoc tag.
Ø It is also known as metadata.
Ø The facility provided by java5.0 for annotation are
a) A syntax for declaring annotation types
Ex: public @interface Car {
String companyName();
String model();
String type() default "[economy]";
}
b) A syntax for annotating declarations
c) APIs for reading annotaions
d) A class file representation for annotaions
e) An annotation processing tool
No comments:
Post a Comment