mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-21 10:57:56 +00:00
8044855: Add missing @since tag under java.beans.*
Reviewed-by: prr, malenkov
This commit is contained in:
parent
28f895afc9
commit
fc858b5c96
@ -33,6 +33,8 @@ import java.lang.ref.Reference;
|
||||
* <p>
|
||||
* This is one of the kinds of descriptor returned by a BeanInfo object,
|
||||
* which also returns descriptors for properties, method, and events.
|
||||
*
|
||||
* @since 1.1
|
||||
*/
|
||||
|
||||
public class BeanDescriptor extends FeatureDescriptor {
|
||||
|
||||
@ -48,6 +48,8 @@ import java.awt.Image;
|
||||
* the {@code SimpleBeanInfo} class to define specific information.
|
||||
* <p>
|
||||
* See also the {@link Introspector} class to learn more about bean behavior.
|
||||
*
|
||||
* @since 1.1
|
||||
*/
|
||||
public interface BeanInfo {
|
||||
|
||||
|
||||
@ -56,6 +56,8 @@ import java.util.Vector;
|
||||
|
||||
/**
|
||||
* This class provides some general purpose beans control methods.
|
||||
*
|
||||
* @since 1.1
|
||||
*/
|
||||
|
||||
public class Beans {
|
||||
@ -96,6 +98,7 @@ public class Beans {
|
||||
* @exception ClassNotFoundException if the class of a serialized
|
||||
* object could not be found.
|
||||
* @exception IOException if an I/O error occurs.
|
||||
* @since 1.2
|
||||
*/
|
||||
|
||||
public static Object instantiate(ClassLoader cls, String beanName, BeanContext beanContext) throws IOException, ClassNotFoundException {
|
||||
@ -152,6 +155,7 @@ public class Beans {
|
||||
* @exception ClassNotFoundException if the class of a serialized
|
||||
* object could not be found.
|
||||
* @exception IOException if an I/O error occurs.
|
||||
* @since 1.2
|
||||
*/
|
||||
|
||||
public static Object instantiate(ClassLoader cls, String beanName, BeanContext beanContext, AppletInitializer initializer)
|
||||
|
||||
@ -33,6 +33,8 @@ package java.beans;
|
||||
* it can be instantiated inside an AWT dialog or panel.
|
||||
* <P>
|
||||
* Each customizer should have a null constructor.
|
||||
*
|
||||
* @since 1.1
|
||||
*/
|
||||
|
||||
public interface Customizer {
|
||||
|
||||
@ -36,6 +36,8 @@ import java.lang.reflect.Modifier;
|
||||
* The given group of events are all delivered as method calls on a single
|
||||
* event listener interface, and an event listener object can be registered
|
||||
* via a call on a registration method supplied by the event source.
|
||||
*
|
||||
* @since 1.1
|
||||
*/
|
||||
public class EventSetDescriptor extends FeatureDescriptor {
|
||||
|
||||
|
||||
@ -46,6 +46,8 @@ import java.util.Map.Entry;
|
||||
* <p>
|
||||
* In addition it provides an extension mechanism so that arbitrary
|
||||
* attribute/value pairs can be associated with a design feature.
|
||||
*
|
||||
* @since 1.1
|
||||
*/
|
||||
|
||||
public class FeatureDescriptor {
|
||||
@ -145,6 +147,7 @@ public class FeatureDescriptor {
|
||||
* important for presenting to humans.
|
||||
*
|
||||
* @return True if this feature should be preferentially shown to human users.
|
||||
* @since 1.2
|
||||
*/
|
||||
public boolean isPreferred() {
|
||||
return preferred;
|
||||
@ -156,6 +159,7 @@ public class FeatureDescriptor {
|
||||
*
|
||||
* @param preferred True if this feature should be preferentially shown
|
||||
* to human users.
|
||||
* @since 1.2
|
||||
*/
|
||||
public void setPreferred(boolean preferred) {
|
||||
this.preferred = preferred;
|
||||
|
||||
@ -36,6 +36,8 @@ import java.lang.reflect.Method;
|
||||
* An indexed property may also provide simple non-indexed read and write
|
||||
* methods. If these are present, they read and write arrays of the type
|
||||
* returned by the indexed read method.
|
||||
*
|
||||
* @since 1.1
|
||||
*/
|
||||
|
||||
public class IndexedPropertyDescriptor extends PropertyDescriptor {
|
||||
@ -209,6 +211,8 @@ public class IndexedPropertyDescriptor extends PropertyDescriptor {
|
||||
* @param readMethod The new indexed read method.
|
||||
* @throws IntrospectionException if an exception occurs during
|
||||
* introspection.
|
||||
*
|
||||
* @since 1.2
|
||||
*/
|
||||
public synchronized void setIndexedReadMethod(Method readMethod)
|
||||
throws IntrospectionException {
|
||||
@ -288,6 +292,8 @@ public class IndexedPropertyDescriptor extends PropertyDescriptor {
|
||||
* @param writeMethod The new indexed write method.
|
||||
* @throws IntrospectionException if an exception occurs during
|
||||
* introspection.
|
||||
*
|
||||
* @since 1.2
|
||||
*/
|
||||
public synchronized void setIndexedWriteMethod(Method writeMethod)
|
||||
throws IntrospectionException {
|
||||
|
||||
@ -32,6 +32,8 @@ package java.beans;
|
||||
* to a Class object, not being able to resolve a string method name,
|
||||
* or specifying a method name that has the wrong type signature for
|
||||
* its intended use.
|
||||
*
|
||||
* @since 1.1
|
||||
*/
|
||||
|
||||
public
|
||||
|
||||
@ -90,6 +90,8 @@ import sun.reflect.misc.ReflectUtil;
|
||||
* For more information about introspection and design patterns, please
|
||||
* consult the
|
||||
* <a href="http://www.oracle.com/technetwork/java/javase/documentation/spec-136004.html">JavaBeans™ specification</a>.
|
||||
*
|
||||
* @since 1.1
|
||||
*/
|
||||
|
||||
public class Introspector {
|
||||
@ -97,14 +99,17 @@ public class Introspector {
|
||||
// Flags that can be used to control getBeanInfo:
|
||||
/**
|
||||
* Flag to indicate to use of all beaninfo.
|
||||
* @since 1.2
|
||||
*/
|
||||
public final static int USE_ALL_BEANINFO = 1;
|
||||
/**
|
||||
* Flag to indicate to ignore immediate beaninfo.
|
||||
* @since 1.2
|
||||
*/
|
||||
public final static int IGNORE_IMMEDIATE_BEANINFO = 2;
|
||||
/**
|
||||
* Flag to indicate to ignore all beaninfo.
|
||||
* @since 1.2
|
||||
*/
|
||||
public final static int IGNORE_ALL_BEANINFO = 3;
|
||||
|
||||
@ -214,6 +219,7 @@ public class Introspector {
|
||||
* @return A BeanInfo object describing the target bean.
|
||||
* @exception IntrospectionException if an exception occurs during
|
||||
* introspection.
|
||||
* @since 1.2
|
||||
*/
|
||||
public static BeanInfo getBeanInfo(Class<?> beanClass, int flags)
|
||||
throws IntrospectionException {
|
||||
@ -354,6 +360,8 @@ public class Introspector {
|
||||
* not normally required. It is normally only needed by advanced
|
||||
* tools that update existing "Class" objects in-place and need
|
||||
* to make the Introspector re-analyze existing Class objects.
|
||||
*
|
||||
* @since 1.2
|
||||
*/
|
||||
|
||||
public static void flushCaches() {
|
||||
@ -377,6 +385,7 @@ public class Introspector {
|
||||
*
|
||||
* @param clz Class object to be flushed.
|
||||
* @throws NullPointerException If the Class object is null.
|
||||
* @since 1.2
|
||||
*/
|
||||
public static void flushFromCaches(Class<?> clz) {
|
||||
if (clz == null) {
|
||||
|
||||
@ -34,6 +34,8 @@ import java.util.ArrayList;
|
||||
/**
|
||||
* A MethodDescriptor describes a particular method that a Java Bean
|
||||
* supports for external access from other components.
|
||||
*
|
||||
* @since 1.1
|
||||
*/
|
||||
|
||||
public class MethodDescriptor extends FeatureDescriptor {
|
||||
|
||||
@ -32,6 +32,8 @@ package java.beans;
|
||||
* class.
|
||||
* <p>
|
||||
* Currently all our state comes from the FeatureDescriptor base class.
|
||||
*
|
||||
* @since 1.1
|
||||
*/
|
||||
|
||||
public class ParameterDescriptor extends FeatureDescriptor {
|
||||
|
||||
@ -43,6 +43,8 @@ import java.util.EventObject;
|
||||
* An event source may send a null object as the name to indicate that an
|
||||
* arbitrary set of if its properties have changed. In this case the
|
||||
* old and new values should also be null.
|
||||
*
|
||||
* @since 1.1
|
||||
*/
|
||||
public class PropertyChangeEvent extends EventObject {
|
||||
private static final long serialVersionUID = 7042693688939648123L;
|
||||
|
||||
@ -29,6 +29,7 @@ package java.beans;
|
||||
* A "PropertyChange" event gets fired whenever a bean changes a "bound"
|
||||
* property. You can register a PropertyChangeListener with a source
|
||||
* bean so as to be notified of any bound property updates.
|
||||
* @since 1.1
|
||||
*/
|
||||
|
||||
public interface PropertyChangeListener extends java.util.EventListener {
|
||||
|
||||
@ -77,6 +77,7 @@ import java.util.Map.Entry;
|
||||
* non-serializable listeners will be skipped during serialization.
|
||||
*
|
||||
* @see VetoableChangeSupport
|
||||
* @since 1.1
|
||||
*/
|
||||
public class PropertyChangeSupport implements Serializable {
|
||||
private PropertyChangeListenerMap map = new PropertyChangeListenerMap();
|
||||
@ -191,6 +192,7 @@ public class PropertyChangeSupport implements Serializable {
|
||||
*
|
||||
* @param propertyName The name of the property to listen on.
|
||||
* @param listener The PropertyChangeListener to be added
|
||||
* @since 1.2
|
||||
*/
|
||||
public void addPropertyChangeListener(
|
||||
String propertyName,
|
||||
@ -216,6 +218,7 @@ public class PropertyChangeSupport implements Serializable {
|
||||
*
|
||||
* @param propertyName The name of the property that was listened on.
|
||||
* @param listener The PropertyChangeListener to be removed
|
||||
* @since 1.2
|
||||
*/
|
||||
public void removePropertyChangeListener(
|
||||
String propertyName,
|
||||
@ -277,6 +280,7 @@ public class PropertyChangeSupport implements Serializable {
|
||||
* @param propertyName the programmatic name of the property that was changed
|
||||
* @param oldValue the old value of the property
|
||||
* @param newValue the new value of the property
|
||||
* @since 1.2
|
||||
*/
|
||||
public void firePropertyChange(String propertyName, int oldValue, int newValue) {
|
||||
if (oldValue != newValue) {
|
||||
@ -297,6 +301,7 @@ public class PropertyChangeSupport implements Serializable {
|
||||
* @param propertyName the programmatic name of the property that was changed
|
||||
* @param oldValue the old value of the property
|
||||
* @param newValue the new value of the property
|
||||
* @since 1.2
|
||||
*/
|
||||
public void firePropertyChange(String propertyName, boolean oldValue, boolean newValue) {
|
||||
if (oldValue != newValue) {
|
||||
@ -312,6 +317,7 @@ public class PropertyChangeSupport implements Serializable {
|
||||
* No event is fired if the given event's old and new values are equal and non-null.
|
||||
*
|
||||
* @param event the {@code PropertyChangeEvent} to be fired
|
||||
* @since 1.2
|
||||
*/
|
||||
public void firePropertyChange(PropertyChangeEvent event) {
|
||||
Object oldValue = event.getOldValue();
|
||||
@ -410,6 +416,7 @@ public class PropertyChangeSupport implements Serializable {
|
||||
*
|
||||
* @param propertyName the property name.
|
||||
* @return true if there are one or more listeners for the given property
|
||||
* @since 1.2
|
||||
*/
|
||||
public boolean hasListeners(String propertyName) {
|
||||
return this.map.hasListeners(propertyName);
|
||||
|
||||
@ -32,6 +32,7 @@ import java.lang.reflect.Constructor;
|
||||
/**
|
||||
* A PropertyDescriptor describes one property that a Java Bean
|
||||
* exports via a pair of accessor methods.
|
||||
* @since 1.1
|
||||
*/
|
||||
public class PropertyDescriptor extends FeatureDescriptor {
|
||||
|
||||
@ -244,6 +245,7 @@ public class PropertyDescriptor extends FeatureDescriptor {
|
||||
*
|
||||
* @param readMethod The new read method.
|
||||
* @throws IntrospectionException if the read method is invalid
|
||||
* @since 1.2
|
||||
*/
|
||||
public synchronized void setReadMethod(Method readMethod)
|
||||
throws IntrospectionException {
|
||||
@ -314,6 +316,7 @@ public class PropertyDescriptor extends FeatureDescriptor {
|
||||
*
|
||||
* @param writeMethod The new write method.
|
||||
* @throws IntrospectionException if the write method is invalid
|
||||
* @since 1.2
|
||||
*/
|
||||
public synchronized void setWriteMethod(Method writeMethod)
|
||||
throws IntrospectionException {
|
||||
|
||||
@ -51,6 +51,8 @@ package java.beans;
|
||||
* or support setAsText.
|
||||
* <p>
|
||||
* Each PropertyEditor should have a null constructor.
|
||||
*
|
||||
* @since 1.1
|
||||
*/
|
||||
|
||||
public interface PropertyEditor {
|
||||
|
||||
@ -48,6 +48,8 @@ package java.beans;
|
||||
* Default PropertyEditors will be provided for the Java primitive types
|
||||
* "boolean", "byte", "short", "int", "long", "float", and "double"; and
|
||||
* for the classes java.lang.String. java.awt.Color, and java.awt.Font.
|
||||
*
|
||||
* @since 1.1
|
||||
*/
|
||||
|
||||
public class PropertyEditorManager {
|
||||
|
||||
@ -31,6 +31,8 @@ import java.beans.*;
|
||||
* This is a support class to help build property editors.
|
||||
* <p>
|
||||
* It can be used either as a base class or as a delegate.
|
||||
*
|
||||
* @since 1.1
|
||||
*/
|
||||
|
||||
public class PropertyEditorSupport implements PropertyEditor {
|
||||
|
||||
@ -29,6 +29,7 @@ package java.beans;
|
||||
/**
|
||||
* A PropertyVetoException is thrown when a proposed change to a
|
||||
* property represents an unacceptable value.
|
||||
* @since 1.1
|
||||
*/
|
||||
|
||||
public
|
||||
|
||||
@ -34,6 +34,8 @@ package java.beans;
|
||||
* When the introspector sees the "noop" values, it will apply low
|
||||
* level introspection and design patterns to automatically analyze
|
||||
* the target bean.
|
||||
*
|
||||
* @since 1.1
|
||||
*/
|
||||
|
||||
public class SimpleBeanInfo implements BeanInfo {
|
||||
|
||||
@ -29,6 +29,7 @@ package java.beans;
|
||||
* A VetoableChange event gets fired whenever a bean changes a "constrained"
|
||||
* property. You can register a VetoableChangeListener with a source bean
|
||||
* so as to be notified of any constrained property updates.
|
||||
* @since 1.1
|
||||
*/
|
||||
public interface VetoableChangeListener extends java.util.EventListener {
|
||||
/**
|
||||
|
||||
@ -77,6 +77,7 @@ import java.util.Map.Entry;
|
||||
* non-serializable listeners will be skipped during serialization.
|
||||
*
|
||||
* @see PropertyChangeSupport
|
||||
* @since 1.1
|
||||
*/
|
||||
public class VetoableChangeSupport implements Serializable {
|
||||
private VetoableChangeListenerMap map = new VetoableChangeListenerMap();
|
||||
@ -191,6 +192,7 @@ public class VetoableChangeSupport implements Serializable {
|
||||
*
|
||||
* @param propertyName The name of the property to listen on.
|
||||
* @param listener The VetoableChangeListener to be added
|
||||
* @since 1.2
|
||||
*/
|
||||
public void addVetoableChangeListener(
|
||||
String propertyName,
|
||||
@ -216,6 +218,7 @@ public class VetoableChangeSupport implements Serializable {
|
||||
*
|
||||
* @param propertyName The name of the property that was listened on.
|
||||
* @param listener The VetoableChangeListener to be removed
|
||||
* @since 1.2
|
||||
*/
|
||||
public void removeVetoableChangeListener(
|
||||
String propertyName,
|
||||
@ -292,6 +295,7 @@ public class VetoableChangeSupport implements Serializable {
|
||||
* @param oldValue the old value of the property
|
||||
* @param newValue the new value of the property
|
||||
* @throws PropertyVetoException if one of listeners vetoes the property update
|
||||
* @since 1.2
|
||||
*/
|
||||
public void fireVetoableChange(String propertyName, int oldValue, int newValue)
|
||||
throws PropertyVetoException {
|
||||
@ -320,6 +324,7 @@ public class VetoableChangeSupport implements Serializable {
|
||||
* @param oldValue the old value of the property
|
||||
* @param newValue the new value of the property
|
||||
* @throws PropertyVetoException if one of listeners vetoes the property update
|
||||
* @since 1.2
|
||||
*/
|
||||
public void fireVetoableChange(String propertyName, boolean oldValue, boolean newValue)
|
||||
throws PropertyVetoException {
|
||||
@ -343,6 +348,7 @@ public class VetoableChangeSupport implements Serializable {
|
||||
*
|
||||
* @param event the {@code PropertyChangeEvent} to be fired
|
||||
* @throws PropertyVetoException if one of listeners vetoes the property update
|
||||
* @since 1.2
|
||||
*/
|
||||
public void fireVetoableChange(PropertyChangeEvent event)
|
||||
throws PropertyVetoException {
|
||||
@ -399,6 +405,7 @@ public class VetoableChangeSupport implements Serializable {
|
||||
*
|
||||
* @param propertyName the property name.
|
||||
* @return true if there are one or more listeners for the given property
|
||||
* @since 1.2
|
||||
*/
|
||||
public boolean hasListeners(String propertyName) {
|
||||
return this.map.hasListeners(propertyName);
|
||||
|
||||
@ -34,6 +34,8 @@ package java.beans;
|
||||
* This interface is for expert developers, and is not needed
|
||||
* for normal simple beans. To avoid confusing end-users we
|
||||
* avoid using getXXX setXXX design patterns for these methods.
|
||||
*
|
||||
* @since 1.1
|
||||
*/
|
||||
|
||||
public interface Visibility {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user