Java Examples In A Nutshell (3rd Edition) [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Java Examples In A Nutshell (3rd Edition) [Electronic resources] - نسخه متنی

O'Reilly Media, Inc

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید










Chapter 9. Reflection


The Reflection API allows a Java program
to inspect and manipulate itself; it comprises the
java.lang.Class class and the
java.lang.reflect package, which represents the
members of a class with Method,
Constructor, and Field objects.

Reflection can obtain information about a
class and its members. This is the technique that the
JavaBeans™ (see Chapter 15)
introspection mechanism uses to determine the properties, events, and
methods that are supported by a bean, for example. Reflection can
also manipulate objects in Java. You can use the
Field class to query and set the values of fields,
the Method class to invoke methods, and the
Constructor class to create new objects. The
examples in this chapter demonstrate both object inspection and
manipulation using the Reflection API.

In addition to the examples in this chapter, the Java Reflection API
also features prominently in Examples Example 15-10
and Example 18-3.


/ 285