What is reflection? what's the effect?

Java reflection, is in the operating state.

  • Gets the name of any class, Package information, all the properties, methods, annotated, type, class loader, etc.
  • Acquiring attribute of any object, and change the properties of an object
  • Call any object's methods
  • Determining a class object belongs to any
  • Any object instance of a class of
  • Java dynamic is reflected in this. By reflection we can achieve dynamic assembly, decouple code; dynamic agents. Reflection of excessive use of system resources will be severely depleted.

JDK in java.lang.Class class, is one of the core classes in order to achieve the reflection provided.

Get Class method, a Class of one jvm will be instantiated once.


 


 

All resources resources are summarized in the public No.


 

 

Guess you like

Origin www.cnblogs.com/ConstXiong/p/11831460.html