Java Reflection

What’s Going On in There? Java Reflection for Program Insight

By Sridhar M S

Go to page: 1  2 3 Next

In programming terms, reflection is a feature that allows you to see the internal composition of a program—everything from its variables to its method declarations. As its name indicates, the Java Reflection API enables this functionality in Java.

The Java Reflection API provides insight into the classes, interfaces, and objects in a given Java Virtual Machine (JVM). Developers commonly use the API to accomplish the following tasks, which explains why it is so often used to develop tools such as debuggers and Integrated Development Environments (IDEs):

  • Determine the class of an object.
  • Get information about a class’s modifiers, fields, methods, constructors, etc.
  • Get information about an interface’s constants and method declarations.
  • Create an instance of a class whose name is not known until runtime, but rather available at design time or provided as a runtime parameter.
  • Get and set the value of an object’s field, even if the field name is unknown to your program until runtime.
  • Invoke a method on an object, even if the method is not known until runtime.

http://www.developer.com/java/article.php/3819961

Etiquetas: , ,

Anuncios

Responder

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión / Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión / Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión / Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión / Cambiar )

Conectando a %s

A %d blogueros les gusta esto: