* List of listeners who are interested in the read-only status changes of
* the MethodProperty
*/
- private LinkedList readOnlyStatusChangeListeners = null;
+ private LinkedList<ReadOnlyStatusChangeListener> readOnlyStatusChangeListeners = null;
/**
* List of listeners who are interested in the value changes of the
* MethodProperty
*/
- private LinkedList valueChangeListeners = null;
+ private LinkedList<ValueChangeListener> valueChangeListeners = null;
/* Special serialization to handle method references */
private void writeObject(java.io.ObjectOutputStream out) throws IOException {
* @param beanPropertyName
* the name of the property to bind to.
*/
+ @SuppressWarnings("unchecked")
public MethodProperty(Object instance, String beanPropertyName) {
final Class beanClass = instance.getClass();
* the name of the setter method.
*
*/
+ @SuppressWarnings("unchecked")
public MethodProperty(Class type, Object instance, String getMethodName,
String setMethodName) {
this(type, instance, getMethodName, setMethodName, new Object[] {},
* @param setMethod
* the setter method.
*/
+ @SuppressWarnings("unchecked")
public MethodProperty(Class type, Object instance, Method getMethod,
Method setMethod) {
this(type, instance, getMethod, setMethod, new Object[] {},
* replaced with <code>newValue</code> when
* {@link #setValue(Object newValue)} is called.
*/
+ @SuppressWarnings("unchecked")
public MethodProperty(Class type, Object instance, String getMethodName,
String setMethodName, Object[] getArgs, Object[] setArgs,
int setArgumentIndex) {
* replaced with <code>newValue</code> when
* {@link #setValue(Object newValue)} is called.
*/
+ @SuppressWarnings("unchecked")
public MethodProperty(Class type, Object instance, Method getMethod,
Method setMethod, Object[] getArgs, Object[] setArgs,
int setArgumentIndex) {
*
* @return type of the Property
*/
+ @SuppressWarnings("unchecked")
public final Class getType() {
return type;
}
* native type directly or through <code>String</code>.
* @see #invokeSetMethod(Object)
*/
+ @SuppressWarnings("unchecked")
public void setValue(Object newValue) throws Property.ReadOnlyException,
Property.ConversionException {
*/
public void addListener(Property.ReadOnlyStatusChangeListener listener) {
if (readOnlyStatusChangeListeners == null) {
- readOnlyStatusChangeListeners = new LinkedList();
+ readOnlyStatusChangeListeners = new LinkedList<ReadOnlyStatusChangeListener>();
}
readOnlyStatusChangeListeners.add(listener);
}
public void addListener(ValueChangeListener listener) {
if (valueChangeListeners == null) {
- valueChangeListeners = new LinkedList();
+ valueChangeListeners = new LinkedList<ValueChangeListener>();
}
valueChangeListeners.add(listener);