1 package org.apache.beehive.controls.api.context; 2 19 20 import java.beans.beancontext.BeanContextServices ; 21 import java.beans.PropertyChangeEvent ; 22 import java.beans.PropertyVetoException ; 23 import java.lang.annotation.Annotation ; 24 import java.lang.reflect.AnnotatedElement ; 25 import java.lang.reflect.Method ; 26 27 import org.apache.beehive.controls.api.bean.ControlBean; 28 import org.apache.beehive.controls.api.events.EventSet; 29 import org.apache.beehive.controls.api.properties.PropertyMap; 30 31 58 public interface ControlBeanContext extends BeanContextServices 59 { 60 63 public Class getControlInterface(); 64 65 77 public <T extends Annotation > T getControlPropertySet(Class <T> propertySet); 78 79 89 public <T extends Annotation > T getMethodPropertySet(Method m, Class <T> propertySet) 90 throws IllegalArgumentException ; 91 92 101 public <T extends Annotation > T getParameterPropertySet(Method m, int i, Class <T> propertySet) 102 throws IllegalArgumentException , IndexOutOfBoundsException ; 103 104 110 public String [] getParameterNames(Method m) throws IllegalArgumentException ; 111 112 121 public Object getParameterValue(Method m, String parameterName, Object [] parameters) 122 throws IllegalArgumentException ; 123 124 133 public PropertyMap getControlPropertyMap(); 134 135 145 public <T> T getService(Class <T> serviceClass, Object selector); 146 147 157 public ControlHandle getControlHandle(); 158 159 163 public PropertyMap getAnnotationMap(AnnotatedElement annotElem); 164 165 171 public java.lang.ClassLoader getClassLoader(); 172 173 176 public boolean isSingleThreadedContainer(); 177 178 183 public ControlBean getControlBean(); 184 185 190 public ControlBean getBean(String id); 191 192 196 @EventSet 197 public interface LifeCycle 198 { 199 203 public void onCreate(); 204 205 211 public void onPropertyChange(PropertyChangeEvent pce); 212 213 220 public void onVetoableChange(PropertyChangeEvent pce) throws PropertyVetoException ; 221 } 222 223 228 public void addLifeCycleListener(LifeCycle listener); 229 230 235 public void removeLifeCycleListener(LifeCycle listener); 236 } 237 | Popular Tags |