45 * public long getInit() {...}
46 * public long getUsed() {...}
47 * public long getCommitted() {...}
48 * public long getMax() {...}
49 * }
50 * </pre>
51 * </blockquote>
52 * <p>
53 * The annotation shows that the first parameter of the constructor
54 * can be retrieved with the {@code getInit()} method, the second one with
55 * the {@code getUsed()} method, and so on. Since parameter names are not in
56 * general available at runtime, without the annotation there would be
57 * no way of knowing which parameter corresponds to which property.
58 * </p>
59 * <p>
60 * If a constructor is annotated by the both {@code @java.beans.ConstructorProperties}
61 * and {@code @javax.management.ConstructorParameters} annotations
62 * the JMX introspection will give an absolute precedence to the latter one.
63 * </p>
64 *
65 * @since 1.9
66 */
67 @Documented @Target(CONSTRUCTOR) @Retention(RUNTIME)
68 public @interface ConstructorParameters {
69 /**
70 * <p>The getter names.</p>
71 *
72 * @return the getter names corresponding to the parameters in the
73 * annotated constructor.
74 */
75 String[] value();
76 }
|
45 * public long getInit() {...}
46 * public long getUsed() {...}
47 * public long getCommitted() {...}
48 * public long getMax() {...}
49 * }
50 * </pre>
51 * </blockquote>
52 * <p>
53 * The annotation shows that the first parameter of the constructor
54 * can be retrieved with the {@code getInit()} method, the second one with
55 * the {@code getUsed()} method, and so on. Since parameter names are not in
56 * general available at runtime, without the annotation there would be
57 * no way of knowing which parameter corresponds to which property.
58 * </p>
59 * <p>
60 * If a constructor is annotated by the both {@code @java.beans.ConstructorProperties}
61 * and {@code @javax.management.ConstructorParameters} annotations
62 * the JMX introspection will give an absolute precedence to the latter one.
63 * </p>
64 *
65 * @since 9
66 */
67 @Documented @Target(CONSTRUCTOR) @Retention(RUNTIME)
68 public @interface ConstructorParameters {
69 /**
70 * <p>The getter names.</p>
71 *
72 * @return the getter names corresponding to the parameters in the
73 * annotated constructor.
74 */
75 String[] value();
76 }
|