Java & Eclipse


Observer—Evolving into a pattern, Part 1

The primary objective of this article is to demonstrate to readers how their design and code can evolve to use a pattern. The goal of this evolution is the Observer pattern.

Limitations of reflective method lookup

Reflection is a powerful and intriguing feature of Java. Using the facilities of the class <FONT FACE="Courier">java.lang.Class</FONT> and the Reflection API (<FONT FACE="Courier">package java.lang.reflect</FONT>), programmers can gather information about classes in the JVM at runtime, including references to methods and constructors. After obtaining these references in the form of <FONT FACE="Courier">Method</FONT> and <FONT FACE="Courier">Constructor</FONT> objects, users can invoke them with parameters (via the <FONT FACE="Courier">invoke()</FONT> method of <FONT FACE="Courier">Method</FONT> and the <FONT FACE="Courier">newInstance()</FONT> method of <FONT FACE="Courier">Constructor</FONT>) and manipulate the results.<P> The addition of reflection to the Java API has enabled such potent technologies as JavaBeans, serialization, RMI, and dynamic proxies. However, reflection has limitations that might surprise users. The purpose of this article is to share these limitations with readers, and to offer a solution for dealing with them.

RMI

JSP

Upcoming Training Events

0 AM
Visual Studio Live! San Diego
September 8-12, 2025
Live! 360 Orlando
November 16-21, 2025
Cloud & Containers Live! Orlando
November 16-21, 2025
Data Platform Live! Orlando
November 16-21, 2025
Visual Studio Live! Orlando
November 16-21, 2025