Because reflection involves types that are dynamically resolved, certain Java virtual machine optimizations can not be performed. Consequently, reflective operations have slower performance than their non-reflective counterparts, and should be avoided in sections of code which are called frequently in performance-sensitive applications.java
反射是动态的对类型、方法进行解析,确定是会比直接调用慢一点。jvm没法优化app
java反射机制,是在运行状态中,对于任何一个类,都可以访问这个类的全部属性和方法,同时任何一个对象也都可以调用它的任意一个方法和属性,这个功能称为java语言的反射机制。jvm