--- old/modules/javafx.controls/src/main/java/javafx/scene/control/cell/TreeItemPropertyValueFactory.java 2017-05-03 15:27:12.309615435 -0700 +++ new/modules/javafx.controls/src/main/java/javafx/scene/control/cell/TreeItemPropertyValueFactory.java 2017-05-03 15:27:12.189615432 -0700 @@ -52,12 +52,12 @@ * firstNameCol.setCellValueFactory(new TreeItemPropertyValueFactory<Person,String>("firstName")); * * - * *
* In this example, {@code Person} is the class type of the {@link TreeItem}
* instances used in the {@link TreeTableView}.
+ * The class {@code Person} must be declared public.
* {@code TreeItemPropertyValueFactory} 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
* If no such method exists, then {@code TreeItemPropertyValueFactory} - * 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} @@ -79,15 +79,6 @@ * the {@code TreeTableCell} 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(TreeTableColumn.CellDataFeatures)} method - * will log a warning and return {@code null}. - *
* *For reference (and as noted in the TreeTableColumn * {@link TreeTableColumn#cellValueFactory cell value factory} documentation), the @@ -109,6 +100,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(TreeTableColumn.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 TreeTableColumn * @see TreeTableView * @see TreeTableCell