-
@Retention(RUNTIME) @Target({FIELD,METHOD}) public @interface FXML
Annotation that tags a field or method as accessible to markup.Deploying an Application as a Module
If the object being annotated is in a named module then it must be reflectively accessible to the
javafx.fxmlmodule. Otherwise, theFXMLLoaderwill fail with anInaccessibleObjectExceptionwhen it attempts to modify the annotated element. An object is reflectively accessible if the module containing that objectopensthe containing package to at least thejavafx.fxmlmodule.For example, if the object being annotated is in the
com.foopackage in thefoo.appmodule, themodule-info.javamight look like this:module foo.app { opens com.foo to javafx.fxml; }Alternatively, an object is reflectively accessible if it is declared as a public member, is in a public class, and the module containing that class
exportsthe containing package unconditionally.- Since:
- JavaFX 2.0