O'Reilly logo

JavaFX™ Developer’s Guide by Kim Topley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

13. Reflection

In this chapter, we look at the JavaFX Reflection application programming interface (API). Reflection is primarily of use to tools such as integrated development environments (IDEs) and code generators that need to work, at runtime, with classes that they have no prior knowledge of. Using reflection, you can load any class given its name, create an instance of that class, discover its variables and functions, read and set the values of those variable, and invoke its functions.

The classes that implement the JavaFX Reflection API can be found in the javafx.reflect package. It is possible to use the Java Reflection APIs in the java.lang.reflect package to inspect a JavaFX class, but Java reflection gives a Java view of a JavaFX ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required