-
@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.fxml
module. Otherwise, theFXMLLoader
will fail with anInaccessibleObjectException
when it attempts to modify the annotated element. An object is reflectively accessible if the module containing that objectopens
the containing package to at least thejavafx.fxml
module.For example, if the object being annotated is in the
com.foo
package in thefoo.app
module, themodule-info.java
might 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
exports
the containing package unconditionally.- Since:
- JavaFX 2.0