Module javafx.fxml
Package javafx.fxml

Annotation Type FXML



  • @Retention(RUNTIME)
    @Target({FIELD,METHOD})
    public @interface FXML
    Annotation that tags a field or method as accessible to markup. If the object being annotated is in a named module then it must be reflectively accessible to the javafx.fxml module. Otherwise, the FXMLLoader will fail with an InaccessibleObjectException when it attempts to modify the annotated element. An object is reflectively accessible if the module containing that object opens the containing package to at least the javafx.fxml module, either in its module-info.class or by calling Module.addOpens(java.lang.String, java.lang.Module). An object is also 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 to at least the javafx.fxml module.
    Since:
    JavaFX 2.0