< prev index next >

modules/javafx.base/src/main/java/javafx/beans/binding/Bindings.java

Print this page
rev 10444 : imported patch doc-8177566-trampoline
rev 10445 : [mq]: doc-v1-8177566-trampoline

@@ -95,10 +95,35 @@
  * Also if you watched closely, you might have noticed that the return type of
  * the Fluent API is different in the examples above. In a lot of cases the
  * Fluent API allows to be more specific about the returned type (see
  * {@link javafx.beans.binding.NumberExpression} for more details about implicit
  * casting.
+ * </p>
+ * <p><a id="DeployAppAsModule"></a><b>Deploying an Application as a Module</b></p>
+ * <p>
+ * If any class used in a select-binding (see the various {@code select*}
+ * methods) 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.
+ * </p>
+ * <p>
+ * For example, if {@code com.foo.MyClass} is 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.base;
+}}</pre>
+ *
+ * <p>
+ * Alternatively, a class is reflectively accessible if the module
+ * {@link Module#isExported(String) exports} the containing package
+ * unconditionally.
+ * </p>
  *
  * @see Binding
  * @see NumberBinding
  *
  *

@@ -401,13 +426,19 @@
      * Creates a binding used to get a member, such as {@code a.b.c}. The value
      * of the binding will be {@code c}, or {@code null} if {@code c} could not
      * be reached (due to {@code b} not having a {@code c} property,
      * {@code b} being {@code null}, or {@code c} not being the right type etc.).
      * <p>
-     * All classes and properties used in a select-binding have to be public.
-     *
+     * All classes and properties used in a select-binding have to be
+     * declared public.
+     * Additionally, if any class is in a named module, then it must be
+     * reflectively accessible to the {@code javafx.base} module (see
+     * <a href="#DeployAppAsModule">Deploying an Application as a Module</a>).
+     * </p>
+     * <p>
      * Note: since 8.0, JavaBeans properties are supported and might be in the chain.
+     * </p>
      *
      * @param <T> the type of the wrapped {@code Object}
      * @param root
      *            The root {@link javafx.beans.value.ObservableValue}
      * @param steps

@@ -422,13 +453,19 @@
      * Creates a binding used to get a member, such as {@code a.b.c}. The value
      * of the binding will be {@code c}, or {@code 0.0} if {@code c} could not
      * be reached (due to {@code b} not having a {@code c} property,
      * {@code b} being {@code null}, or {@code c} not being a {@code Number} etc.).
      * <p>
-     * All classes and properties used in a select-binding have to be public.
-     *
+     * All classes and properties used in a select-binding have to be
+     * declared public.
+     * Additionally, if any class is in a named module, then it must be
+     * reflectively accessible to the {@code javafx.base} module (see
+     * <a href="#DeployAppAsModule">Deploying an Application as a Module</a>).
+     * </p>
+     * <p>
      * Note: since 8.0, JavaBeans properties are supported and might be in the chain.
+     * </p>
      *
      * @param root
      *            The root {@link javafx.beans.value.ObservableValue}
      * @param steps
      *            The property names to reach the final property

@@ -442,13 +479,19 @@
      * Creates a binding used to get a member, such as {@code a.b.c}. The value
      * of the binding will be {@code c}, or {@code 0.0f} if {@code c} could not
      * be reached (due to {@code b} not having a {@code c} property,
      * {@code b} being {@code null}, or {@code c} not being a {@code Number} etc.).
      * <p>
-     * All classes and properties used in a select-binding have to be public.
-     *
+     * All classes and properties used in a select-binding have to be
+     * declared public.
+     * Additionally, if any class is in a named module, then it must be
+     * reflectively accessible to the {@code javafx.base} module (see
+     * <a href="#DeployAppAsModule">Deploying an Application as a Module</a>).
+     * </p>
+     * <p>
      * Note: since 8.0, JavaBeans properties are supported and might be in the chain.
+     * </p>
      *
      * @param root
      *            The root {@link javafx.beans.value.ObservableValue}
      * @param steps
      *            The property names to reach the final property

@@ -462,13 +505,19 @@
      * Creates a binding used to get a member, such as {@code a.b.c}. The value
      * of the binding will be {@code c}, or {@code 0} if {@code c} could not
      * be reached (due to {@code b} not having a {@code c} property,
      * {@code b} being {@code null}, or {@code c} not being a {@code Number} etc.).
      * <p>
-     * All classes and properties used in a select-binding have to be public.
-     *
+     * All classes and properties used in a select-binding have to be
+     * declared public.
+     * Additionally, if any class is in a named module, then it must be
+     * reflectively accessible to the {@code javafx.base} module (see
+     * <a href="#DeployAppAsModule">Deploying an Application as a Module</a>).
+     * </p>
+     * <p>
      * Note: since 8.0, JavaBeans properties are supported and might be in the chain.
+     * </p>
      *
      * @param root
      *            The root {@link javafx.beans.value.ObservableValue}
      * @param steps
      *            The property names to reach the final property

@@ -482,13 +531,19 @@
      * Creates a binding used to get a member, such as {@code a.b.c}. The value
      * of the binding will be {@code c}, or {@code 0L} if {@code c} could not
      * be reached (due to {@code b} not having a {@code c} property,
      * {@code b} being {@code null}, or {@code c} not being a {@code Number} etc.).
      * <p>
-     * All classes and properties used in a select-binding have to be public.
-     *
+     * All classes and properties used in a select-binding have to be
+     * declared public.
+     * Additionally, if any class is in a named module, then it must be
+     * reflectively accessible to the {@code javafx.base} module (see
+     * <a href="#DeployAppAsModule">Deploying an Application as a Module</a>).
+     * </p>
+     * <p>
      * Note: since 8.0, JavaBeans properties are supported and might be in the chain.
+     * </p>
      *
      * @param root
      *            The root {@link javafx.beans.value.ObservableValue}
      * @param steps
      *            The property names to reach the final property

@@ -502,13 +557,19 @@
      * Creates a binding used to get a member, such as {@code a.b.c}. The value
      * of the binding will be {@code c}, or {@code false} if {@code c} could not
      * be reached (due to {@code b} not having a {@code c} property,
      * {@code b} being {@code null}, or {@code c} not being a {@code boolean} etc.).
      * <p>
-     * All classes and properties used in a select-binding have to be public.
-     *
+     * All classes and properties used in a select-binding have to be
+     * declared public.
+     * Additionally, if any class is in a named module, then it must be
+     * reflectively accessible to the {@code javafx.base} module (see
+     * <a href="#DeployAppAsModule">Deploying an Application as a Module</a>).
+     * </p>
+     * <p>
      * Note: since 8.0, JavaBeans properties are supported and might be in the chain.
+     * </p>
      *
      * @param root
      *            The root {@link javafx.beans.value.ObservableValue}
      * @param steps
      *            The property names to reach the final property

@@ -522,13 +583,19 @@
      * Creates a binding used to get a member, such as {@code a.b.c}. The value
      * of the binding will be {@code c}, or {@code ""} if {@code c} could not
      * be reached (due to {@code b} not having a {@code c} property,
      * {@code b} being {@code null}, or {@code c} not being a {@code String} etc.).
      * <p>
-     * All classes and properties used in a select-binding have to be public.
-     *
+     * All classes and properties used in a select-binding have to be
+     * declared public.
+     * Additionally, if any class is in a named module, then it must be
+     * reflectively accessible to the {@code javafx.base} module (see
+     * <a href="#DeployAppAsModule">Deploying an Application as a Module</a>).
+     * </p>
+     * <p>
      * Note: since 8.0, JavaBeans properties are supported and might be in the chain.
+     * </p>
      *
      * @param root
      *            The root {@link javafx.beans.value.ObservableValue}
      * @param steps
      *            The property names to reach the final property

@@ -542,14 +609,21 @@
      * Creates a binding used to get a member, such as {@code a.b.c}. The value
      * of the binding will be {@code c}, or {@code null} if {@code c} could not
      * be reached (due to {@code b} not having a {@code c} property,
      * {@code b} being {@code null}, or {@code c} not being the right type etc.).
      * <p>
-     * All classes and properties used in a select-binding have to be public.
+     * All classes and properties used in a select-binding have to be
+     * declared public.
+     * Additionally, if any class is in a named module, then it must be
+     * reflectively accessible to the {@code javafx.base} module (see
+     * <a href="#DeployAppAsModule">Deploying an Application as a Module</a>).
+     * </p>
      *
+     * <p>
      * If root has JavaFX properties, this call is equivalent to {@link #select(javafx.beans.value.ObservableValue, java.lang.String[])},
      * with the {@code root} and {@code step[0]} being substituted with the relevant property object.
+     * </p>
      *
      * @param <T> the type of the wrapped {@code Object}
      * @param root
      *            The root bean.
      * @param steps

@@ -566,14 +640,21 @@
      * Creates a binding used to get a member, such as {@code a.b.c}. The value
      * of the binding will be {@code c}, or {@code 0.0} if {@code c} could not
      * be reached (due to {@code b} not having a {@code c} property,
      * {@code b} being {@code null}, or {@code c} not being a {@code Number} etc.).
      * <p>
-     * All classes and properties used in a select-binding have to be public.
+     * All classes and properties used in a select-binding have to be
+     * declared public.
+     * Additionally, if any class is in a named module, then it must be
+     * reflectively accessible to the {@code javafx.base} module (see
+     * <a href="#DeployAppAsModule">Deploying an Application as a Module</a>).
+     * </p>
      *
+     * <p>
      * If root has JavaFX properties, this call is equivalent to {@link #selectDouble(javafx.beans.value.ObservableValue, java.lang.String[])},
      * with the {@code root} and {@code step[0]} being substituted with the relevant property object.
+     * </p>
      *
      * @param root
      *            The root bean.
      * @param steps
      *            The property names to reach the final property. The first step

@@ -589,14 +670,21 @@
      * Creates a binding used to get a member, such as {@code a.b.c}. The value
      * of the binding will be {@code c}, or {@code 0.0f} if {@code c} could not
      * be reached (due to {@code b} not having a {@code c} property,
      * {@code b} being {@code null}, or {@code c} not being a {@code Number} etc.).
      * <p>
-     * All classes and properties used in a select-binding have to be public.
+     * All classes and properties used in a select-binding have to be
+     * declared public.
+     * Additionally, if any class is in a named module, then it must be
+     * reflectively accessible to the {@code javafx.base} module (see
+     * <a href="#DeployAppAsModule">Deploying an Application as a Module</a>).
+     * </p>
      *
+     * <p>
      * If root has JavaFX properties, this call is equivalent to {@link #selectFloat(javafx.beans.value.ObservableValue, java.lang.String[])},
      * with the {@code root} and {@code step[0]} being substituted with the relevant property object.
+     * </p>
      *
      * @param root
      *            The root bean.
      * @param steps
      *            The property names to reach the final property. The first step

@@ -612,14 +700,21 @@
      * Creates a binding used to get a member, such as {@code a.b.c}. The value
      * of the binding will be {@code c}, or {@code 0} if {@code c} could not
      * be reached (due to {@code b} not having a {@code c} property,
      * {@code b} being {@code null}, or {@code c} not being a {@code Number} etc.).
      * <p>
-     * All classes and properties used in a select-binding have to be public.
+     * All classes and properties used in a select-binding have to be
+     * declared public.
+     * Additionally, if any class is in a named module, then it must be
+     * reflectively accessible to the {@code javafx.base} module (see
+     * <a href="#DeployAppAsModule">Deploying an Application as a Module</a>).
+     * </p>
      *
+     * <p>
      * If root has JavaFX properties, this call is equivalent to {@link #selectInteger(javafx.beans.value.ObservableValue, java.lang.String[])},
      * with the {@code root} and {@code step[0]} being substituted with the relevant property object.
+     * </p>
      *
      * @param root
      *            The root bean.
      * @param steps
      *            The property names to reach the final property. The first step

@@ -635,14 +730,21 @@
      * Creates a binding used to get a member, such as {@code a.b.c}. The value
      * of the binding will be {@code c}, or {@code 0L} if {@code c} could not
      * be reached (due to {@code b} not having a {@code c} property,
      * {@code b} being {@code null}, or {@code c} not being a {@code Number} etc.).
      * <p>
-     * All classes and properties used in a select-binding have to be public.
+     * All classes and properties used in a select-binding have to be
+     * declared public.
+     * Additionally, if any class is in a named module, then it must be
+     * reflectively accessible to the {@code javafx.base} module (see
+     * <a href="#DeployAppAsModule">Deploying an Application as a Module</a>).
+     * </p>
      *
+     * <p>
      * If root has JavaFX properties, this call is equivalent to {@link #selectLong(javafx.beans.value.ObservableValue, java.lang.String[])},
      * with the {@code root} and {@code step[0]} being substituted with the relevant property object.
+     * </p>
      *
      * @param root
      *            The root bean.
      * @param steps
      *            The property names to reach the final property. The first step

@@ -658,14 +760,21 @@
      * Creates a binding used to get a member, such as {@code a.b.c}. The value
      * of the binding will be {@code c}, or {@code false} if {@code c} could not
      * be reached (due to {@code b} not having a {@code c} property,
      * {@code b} being {@code null}, or {@code c} not being a {@code boolean} etc.).
      * <p>
-     * All classes and properties used in a select-binding have to be public.
+     * All classes and properties used in a select-binding have to be
+     * declared public.
+     * Additionally, if any class is in a named module, then it must be
+     * reflectively accessible to the {@code javafx.base} module (see
+     * <a href="#DeployAppAsModule">Deploying an Application as a Module</a>).
+     * </p>
      *
+     * <p>
      * If root has JavaFX properties, this call is equivalent to {@link #selectBoolean(javafx.beans.value.ObservableValue, java.lang.String[])},
      * with the {@code root} and {@code step[0]} being substituted with the relevant property object.
+     * </p>
      *
      * @param root
      *            The root bean.
      * @param steps
      *            The property names to reach the final property. The first step

@@ -681,14 +790,21 @@
      * Creates a binding used to get a member, such as {@code a.b.c}. The value
      * of the binding will be {@code c}, or {@code ""} if {@code c} could not
      * be reached (due to {@code b} not having a {@code c} property,
      * {@code b} being {@code null}, or {@code c} not being a {@code String} etc.).
      * <p>
-     * All classes and properties used in a select-binding have to be public.
+     * All classes and properties used in a select-binding have to be
+     * declared public.
+     * Additionally, if any class is in a named module, then it must be
+     * reflectively accessible to the {@code javafx.base} module (see
+     * <a href="#DeployAppAsModule">Deploying an Application as a Module</a>).
+     * </p>
      *
+     * <p>
      * If root has JavaFX properties, this call is equivalent to {@link #selectString(javafx.beans.value.ObservableValue, java.lang.String[])},
      * with the {@code root} and {@code step[0]} being substituted with the relevant property object.
+     * </p>
      *
      * @param root
      *            The root bean.
      * @param steps
      *            The property names to reach the final property. The first step
< prev index next >