提交 9eb93842 编写于 作者: A alanb

8006524: JSR-3: Allows java.beans to be optional

Reviewed-by: dfuchs, mchung
上级 ec91f18e
......@@ -907,6 +907,14 @@ public interface ModuleMXBean {
<li><p>Otherwise, <em>J</em> is not reconstructible.</p></li>
</ol>
<p>Rule 2 is not applicable to subset Profiles of Java SE that do not
include the {@code java.beans} package. When targeting a runtime that does
not include the {@code java.beans} package, and where there is a mismatch
between the compile-time and runtime environment whereby <em>J</em> is
compiled with a public constructor and the {@code ConstructorProperties}
annotation, then <em>J</em> is not reconstructible unless another rule
applies.</p>
<p>Here are examples showing different ways to code a type {@code
NamedNumber} that consists of an {@code int} and a {@code
String}. In each case, the {@code CompositeType} looks like this:</p>
......
......@@ -60,19 +60,20 @@ questions.
<i>v</i>. A value <i>x</i> is extracted from <i>v</i> as follows:</p>
<ul>
<li>If <i>v</i> is a {@link javax.management.openmbean.CompositeData
CompositeData} and if <i>v</i>.{@link
javax.management.openmbean.CompositeData#get(String) get}(<i>e</i>)
returns a value then <i>x</i> is that value.</li>
<li>If <i>v</i> is an array and <i>e</i> is the string <tt>"length"</tt>
then <i>x</i> is the length of the array.</li>
<li>If the above rules do not produce a value, and if {@link
java.beans.Introspector#getBeanInfo(Class) Introspector.getBeanInfo}
for the class of <i>v</i> (<i>v</i>.<tt>getClass()</tt>) contains a
{@link java.beans.PropertyDescriptor PropertyDescriptor} with the name
<i>e</i>, then <i>x</i> is the result of calling the property's {@link
java.beans.PropertyDescriptor#getReadMethod() read method} on
<i>v</i>.</li>
<li>If the above rules do not produce a value, and if introspection, as
if by calling {@link java.beans.Introspector#getBeanInfo(Class)
Introspector.getBeanInfo}, for the class of <i>v</i>
(<i>v</i>.<tt>getClass()</tt>) identifies a property with the name
<i>e</i>, then <i>x</i> is the result of reading the property value. </li>
</ul>
<p>The third rule means for example that if the attribute
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册