1 7 package com.inversoft.beans; 8 9 10 import java.util.ArrayList ; 11 import java.util.Iterator ; 12 import java.util.List ; 13 14 15 20 public class SynchronizedNestedBeanProperty extends NestedBeanProperty { 21 22 25 protected SynchronizedNestedBeanProperty() throws BeanException { 26 super(); 27 } 28 29 32 public SynchronizedNestedBeanProperty(String propertyName, Class beanClass) 33 throws BeanException { 34 super(propertyName, beanClass); 35 } 36 37 40 public SynchronizedNestedBeanProperty(String propertyName, String beanClass) 41 throws BeanException { 42 super(propertyName, beanClass); 43 } 44 45 48 public SynchronizedNestedBeanProperty(String propertyName, Class beanClass, 49 boolean strict) throws BeanException { 50 super(propertyName, beanClass, strict); 51 } 52 53 54 59 public void addPropertyListener(PropertyListener listener) { 60 synchronized (super.propertyListeners) { 61 super.addPropertyListener(listener); 62 } 63 } 64 65 70 public void removePropertyListener(PropertyListener listener) { 71 synchronized (super.propertyListeners) { 72 super.removePropertyListener(listener); 73 } 74 } 75 76 81 public Iterator getPropertyListeners() { 82 synchronized (super.propertyListeners) { 83 List newList = (List ) ((ArrayList ) super.propertyListeners).clone(); 84 return newList.iterator(); 85 } 86 } 87 88 93 public boolean hasPropertyListeners() { 94 synchronized (super.propertyListeners) { 95 return super.hasPropertyListeners(); 96 } 97 } 98 99 104 public void addConversionListener(ConversionListener listener) { 105 synchronized (super.conversionListeners) { 106 super.addConversionListener(listener); 107 } 108 } 109 110 115 public void removeConversionListener(ConversionListener listener) { 116 synchronized (super.conversionListeners) { 117 super.removeConversionListener(listener); 118 } 119 } 120 121 126 public Iterator getConversionListeners() { 127 synchronized (super.conversionListeners) { 128 List newList = (List ) ((ArrayList ) super.conversionListeners).clone(); 129 return newList.iterator(); 130 } 131 } 132 133 138 public boolean hasConversionListeners() { 139 synchronized (super.conversionListeners) { 140 return super.hasConversionListeners(); 141 } 142 } 143 } 144 | Popular Tags |