Finding Getters and Setters with Java Reflection

Java Reflection provides a set of useful APIs that help you find methods in Java classes. You can find all the methods in a class or a method with a specific name and signature. Surprisingly, there are no APIs to determine if a Java method is a getter or a setter. In this post, I’ll […]

Finding Generic Types with Java Reflection

Sometimes you need to access type information as Java programs execute. Accessing a field’s type, for instance, is necessary to invoke a setter or getter for that field at run time. And obtaining types for a method’s parameters and return value let you invoke that method “on-the-fly” when needed. In this post, I show you […]

Navigating Class Hierarchies with Java Reflection

Java Reflection makes it easy to find fields, methods, and constructors in your Java classes. Most of the time a single class is all you need to look at. However, sometimes you need to navigate through a class hierarchy. In this post, I’ll show you how to use Java Reflection to navigate class hierarchies. You’ll […]

JavaFX and the NetBeans Platform

We have just returned from JavaOne 2012 in San Francisco, energized with the prominence of both JavaFX and NetBeans talks. In particular, the NetBeans Platform enjoyed recognition during NetBeans Day and also in many sessions at JavaOne. One of these sessions was ours: Make Your Clients Richer: JavaFX and the NetBeans Platform. In this session […]

JavaFX: Properties on Steroids

At the heart of JavaFX is its scenegraph, a structure that includes (perhaps many) nodes. The JavaFX rendering engine displays these nodes and ultimately what you see depends on the properties of these nodes. Properties are oh-so-important. They make a Circle red or a Rectangle 50 pixels wide. They determine the gradient for a background […]