And the impact of this declaration is that you can’t extend this class or make a child class of it. Now we have ‘final’ keyword in class declaration. What is this metadata in java language context? Why we even care about them? Let’s understand the need to metadata with an example.īelow is a sourcecode of class which is declared as final: We are talking about meta data multiple times. “A metadata facility for the Java-TM Programming Language would allow classes, interfaces, fields, and methods to be marked as having particular attributes”. The JSR description states it’s purpose as : In java, Annotations were introduced as “A Metadata Facility” through JSR 175. Discussion Points History and Overview of Java Annotations Built_in Annotations in Java Annotations Applied To Other Annotations Annotations Applied To Java Code Custom Annotations in Java Creating Custom Annotations Using Custom Annotations Processing Annotations Using Reflection Summary In this tutorial, I am discussing all important concepts which you should keep handy with you, to make the best of this wonderful feature of java language. It is important to learn that the annotations applied on java sourcecode is compiled into bytecode with other class members, and using reflection programmer can query this meta data information to decide the appropriate action to perform in any particular context. Just to mention, we can annotate classes, methods, variables, parameters and packages in java OR in one word almost everything. An annotation is a kind of meta data in java which can be applied at various elements of java sourcecode so that later some tool, debugger or application program can take advantage of these annotations and help analyzing the program in positive and constructive way.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |