一、什么是反射?反射(Reflection)是Java的特征之一,它允许运行中的Java程序获取自身的信息,并且可以操作类或对象的内部属性。Oracle官方对反射的解释是:ReflectionenablesJavacodetodiscoverinformationaboutthefields,methodsandconstructorsofloadedclasses,andtousereflectedfields,methods,andconstructorstooperateontheirunderlyingcounterparts,withinsecurityrestrictions.TheAPIaccommodatesapplicationsthatneeda...