How do I access a JavaFX 1.3 static class member from Java?
- by James
I want to access a static JavaFX class member from Java using the Javafx reflection API.
E.g. JavaFX code:
var thing;
class MyJavaFXClass {
}
Java code:
private Object getThing() {
FXClassType classType = FXContext.getInstance().findClass("mypackage.MyJavaFXClass");
// Get static member 'thing' from 'MyJavaFXClass'
// <Insert Code Here>
return thing;
}
What Java code do I need to access 'MyJavaFXClass.thing'?
Note: I am using JavaFX 1.3 - I'm not sure if the reflection API is different here to earlier JavaFX versions.