< prev index next >

modules/javafx.fxml/src/main/java/javafx/fxml/FXML.java

Print this page
rev 10443 : [mq]: doc-8177566-trampoline

@@ -38,16 +38,27 @@
  * {@code InaccessibleObjectException} when it attempts to modify the
  * annotated element.
  * An object is reflectively accessible if the module containing that
  * object {@link Module#isOpen(String,Module) opens} the containing package to
  * at least the
- * {@code javafx.fxml} module, either in its {@code module-info.class} or
- * by calling {@link Module#addOpens}.
- * 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
- * {@link Module#isExported(String,Module) exports}
- * the containing package to at least the {@code javafx.fxml} module.
+ * {@code javafx.fxml} module.
+ * <p>
+ * For example, if the object being annotated is in the {@code com.foo}
+ * package in the {@code foo.app} module, the {@code module-info.java} might
+ * look like this:
+ * </p>
+ *
+<pre>{@code module foo.app {
+    opens com.foo to javafx.fxml;
+}}</pre>
+ *
+ * <p>
+ * Alternatively, 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 {@link Module#isExported(String) exports} the containing
+ * package unconditionally.
+ * </p>
  *
  * @since JavaFX 2.0
  */
 @Retention(RetentionPolicy.RUNTIME)
 @Target({ElementType.FIELD, ElementType.METHOD})
< prev index next >