摘要
反射是指程序可以访问、检测和修改它本身状态或行为的一种能力。通过反射,Java程序可以加载一个运行时才得知名称的class,得到其完整内部信息,并创建其对象,或对其属性进行设值,或调用其方法。反射是提高Java程序的灵活性和可扩展性至关重要的技术,它使得Java软件系统具有自适应能力。
Reflection refers to an ability that the program can access, detect and modify its own state or behavior. Through reflection, Java programs can load a class knows its name just when running it, get its full internal information, then generate its instance, or set the values of its fields, or call its methods. Reflection is a critical technology to improve the flexibility and scalability of Java programs, it makes that Java software system has a self-adaptive ability.
出处
《科技广场》
2010年第3期130-134,共5页
Science Mosaic
关键词
反射
构造器
属性
方法
数组
Reflection
Constructor
Method
Field
Array