1. create the dynamic instance for what ?
- for get the methods , fields ,constructors ....
2. if the modifers of the method is private/protected , will the method be reflected ?
- getMethod ---Returns a
Method
object that reflects the specified public member method of the class or interface represented by thisClass
object. - getDeclaredMethods ---Returns an array of
Method
objects reflecting all the methods declared by the class or interface represented by thisClass
object. This includes public, protected, default (package) access, and private methods, but excludes inherited methods. - it is the same as to fileds
3.what i learned since now :
- what is reflect in java
- what can reflect do in java
- how to get an instance and the constructors ,methods ,fields through reflect to have a good knowledge of the class which been reflect .
- advantage and disadvantage (low performance ,may be make the program more complex)
- example : dymaic invoke
4. java.lang.Array 类提供了动态创建和访问数组元素的各种静态方法
5.
article :