Where can I find a document to understand about JAVA/Reflection like below code ?
Field.class.getDeclaredField("modifiers")
What is getDeclaredField does?
What is a term "modifiers" do ?
I have seen reflection code in action from here
Where can I find a document to understand about JAVA/Reflection like below code ?
Field.class.getDeclaredField("modifiers")
What is getDeclaredField does?
What is a term "modifiers" do ?
I have seen reflection code in action from here
 
    
     
    
    From the javadoc which should be the first place you look when something is puzzling you.
 
    
    What is
getDeclaredFielddoes?
The method getDeclaredField(String name)
Returns a
Fieldobject that reflects the specified declared field of the class or interface represented by thisClassobject.
What is a term "modifiers" do ?
"modifiers" here represents the name of the field to retrieve, as stated into the javadoc:
The name parameter is a
Stringthat specifies the simple name of the desired field.
To summarize Field.class.getDeclaredField("modifiers"), will get by reflection the field modifiers from the class Field.
 public final class Field extends AccessibleObject implements Member {
      ...
      private int                 modifiers; <-- this
      ...
