--- old/modules/javafx.controls/src/main/java/javafx/scene/control/cell/PropertyValueFactory.java 2017-05-03 15:27:11.873615426 -0700 +++ new/modules/javafx.controls/src/main/java/javafx/scene/control/cell/PropertyValueFactory.java 2017-05-03 15:27:11.753615424 -0700 @@ -55,8 +55,9 @@ *

* In this example, {@code Person} is the class type of the {@code TableView} * {@link TableView#itemsProperty() items} list. + * The class {@code Person} must be declared public. * {@code PropertyValueFactory} uses the constructor argument, - * {@code "firstName"}, to assume that {@code Person} has a method + * {@code "firstName"}, to assume that {@code Person} has a public method * {@code firstNameProperty} with no formal parameters and a return type of * {@code ObservableValue}. *

@@ -69,7 +70,7 @@ *

*

* If no such method exists, then {@code PropertyValueFactory} - * assumes that {@code Person} has a method {@code getFirstName} or + * assumes that {@code Person} has a public method {@code getFirstName} or * {@code isFirstName} with no formal parameters and a return type of * {@code String}. If such a method exists, then it is invoked, and its return * value is wrapped in a {@link ReadOnlyObjectWrapper} @@ -77,15 +78,7 @@ * the {@code TableCell} will not be able to observe changes to the property, * unlike in the first approach above. *

- *

- * The class {@code Person} must be declared public. If that class is in a named - * module, then the module must {@link Module#isOpen(String,Module) open} - * the containing package to at least the {@code javafx.base} module - * (or {@link Module#isExported(String) export} the containing package - * unconditionally). - * Otherwise the {@link #call call(TableColumn.CellDataFeatures)} method - * will log a warning and return {@code null}. - *

+ * *

For reference (and as noted in the TableColumn * {@link TableColumn#cellValueFactory cell value factory} documentation), the * long form of the code above would be the following: @@ -102,6 +95,32 @@ * } * * + *

Deploying an Application as a Module

+ *

+ * If the referenced class is in a named module, then it must be reflectively + * accessible to the {@code javafx.base} module. + * A class is reflectively accessible if the module + * {@link Module#isOpen(String,Module) opens} the containing package to at + * least the {@code javafx.base} module. + * Otherwise the {@link #call call(TableColumn.CellDataFeatures)} method + * will log a warning and return {@code null}. + *

+ *

+ * For example, if the {@code Person} class is in the {@code com.foo} package + * in the {@code foo.app} module, the {@code module-info.java} might + * look like this: + *

+ * +
{@code module foo.app {
+    opens com.foo to javafx.base;
+}}
+ * + *

+ * Alternatively, a class is reflectively accessible if the module + * {@link Module#isExported(String) exports} the containing package + * unconditionally. + *

+ * * @see TableColumn * @see TableView * @see TableCell