1 19 package org.netbeans.tests.j2eeserver.plugin.jsr88; 20 21 import java.beans.*; 22 23 public class EjbConfigBeanBeanInfo extends SimpleBeanInfo { 24 25 26 ; 28 private static BeanDescriptor getBdescriptor(){ 29 BeanDescriptor beanDescriptor = new BeanDescriptor ( EjbConfigBean.class , null ); 31 33 return beanDescriptor; } 35 36 private static final int PROPERTY_jndiName = 0; 38 private static final int PROPERTY_securityProxy = 1; 39 private static final int PROPERTY_ejbName = 2; 40 private static final int PROPERTY_configurationName = 3; 41 42 ; 44 private static PropertyDescriptor[] getPdescriptor(){ 45 PropertyDescriptor[] properties = new PropertyDescriptor[4]; 46 47 try { 48 properties[PROPERTY_jndiName] = new PropertyDescriptor ( "jndiName", EjbConfigBean.class, "getJndiName", "setJndiName" ); 49 properties[PROPERTY_securityProxy] = new PropertyDescriptor ( "securityProxy", EjbConfigBean.class, "getSecurityProxy", "setSecurityProxy" ); 50 properties[PROPERTY_ejbName] = new PropertyDescriptor ( "ejbName", EjbConfigBean.class, "getEjbName", null ); 51 properties[PROPERTY_configurationName] = new PropertyDescriptor ( "configurationName", EjbConfigBean.class, "getConfigurationName", "setConfigurationName" ); 52 } 53 catch( IntrospectionException e) {} 55 57 return properties; } 59 private static final int EVENT_propertyChangeListener = 0; 61 62 ; 64 private static EventSetDescriptor[] getEdescriptor(){ 65 EventSetDescriptor[] eventSets = new EventSetDescriptor[1]; 66 67 try { 68 eventSets[EVENT_propertyChangeListener] = new EventSetDescriptor ( EjbConfigBean.class, "propertyChangeListener", java.beans.PropertyChangeListener .class, new String [] {"propertyChange"}, "addPropertyChangeListener", "removePropertyChangeListener" ); 69 } 70 catch( IntrospectionException e) {} 72 74 return eventSets; } 76 private static final int METHOD_getDConfigBean0 = 0; 78 private static final int METHOD_notifyDDChange1 = 1; 79 private static final int METHOD_removeDConfigBean2 = 2; 80 81 ; 83 private static MethodDescriptor[] getMdescriptor(){ 84 MethodDescriptor[] methods = new MethodDescriptor[3]; 85 86 try { 87 methods[METHOD_getDConfigBean0] = new MethodDescriptor ( EjbConfigBean.class.getMethod("getDConfigBean", new Class [] {javax.enterprise.deploy.model.DDBean .class})); 88 methods[METHOD_getDConfigBean0].setDisplayName ( "" ); 89 methods[METHOD_notifyDDChange1] = new MethodDescriptor ( EjbConfigBean.class.getMethod("notifyDDChange", new Class [] {javax.enterprise.deploy.model.XpathEvent .class})); 90 methods[METHOD_notifyDDChange1].setDisplayName ( "" ); 91 methods[METHOD_removeDConfigBean2] = new MethodDescriptor ( EjbConfigBean.class.getMethod("removeDConfigBean", new Class [] {javax.enterprise.deploy.spi.DConfigBean .class})); 92 methods[METHOD_removeDConfigBean2].setDisplayName ( "" ); 93 } 94 catch( Exception e) {} 96 98 return methods; } 100 101 private static final int defaultPropertyIndex = -1; private static final int defaultEventIndex = -1; 104 105 107 109 111 118 public BeanDescriptor getBeanDescriptor() { 119 return getBdescriptor(); 120 } 121 122 134 public PropertyDescriptor[] getPropertyDescriptors() { 135 return getPdescriptor(); 136 } 137 138 145 public EventSetDescriptor[] getEventSetDescriptors() { 146 return getEdescriptor(); 147 } 148 149 156 public MethodDescriptor[] getMethodDescriptors() { 157 return getMdescriptor(); 158 } 159 160 168 public int getDefaultPropertyIndex() { 169 return defaultPropertyIndex; 170 } 171 172 179 public int getDefaultEventIndex() { 180 return defaultEventIndex; 181 } 182 } 183 184 | Popular Tags |