No matter which way the class object is obtained, it is the same.
== Compare the address code
Here to teach you: how to use class objects
Now you know this: how to use reflection, and what kind of function is achieved by reflection.
How to get the corresponding field inside through reflection, get the corresponding function inside and so on will be enough.
annotation:
The comments here are meant to let the compiler implement the compile check function.
In the file, there is @param @return and the like
, You can use javadoc to generate documentation.
In fact, this annotation is interface.
First compile javac, then decompile javap
public abstract can be omitted
Properties, also called methods.
Then just assign it
What is said here is how to delineate the scope of the annotation, delimiting it can only be used in this class instead of the field.
If it is a class, it will not be read by jvm
If yes: source will not be retained at all
If it is runtime, then + will be retained and will be read by jvm.
In this case, if it is not documented, then it will not be saved in the document.
If there is a problem with the encoding , you can use notepad to convert to ANSI encoding
Now, how to define annotations and how to use annotations will describe the code.