1 19 package org.netbeans.tests.j2eeserver.plugin.jsr88; 20 21 import java.beans.*; 22 23 public class EjbRefConfigBeanBeanInfo extends SimpleBeanInfo { 24 25 26 ; 28 private static BeanDescriptor getBdescriptor(){ 29 BeanDescriptor beanDescriptor = new BeanDescriptor ( EjbRefConfigBean.class , null ); 31 33 return beanDescriptor; } 35 36 private static final int PROPERTY_jndiName = 0; 38 39 ; 41 private static PropertyDescriptor[] getPdescriptor(){ 42 PropertyDescriptor[] properties = new PropertyDescriptor[1]; 43 44 try { 45 properties[PROPERTY_jndiName] = new PropertyDescriptor ( "jndiName", EjbRefConfigBean.class, "getJndiName", "setJndiName" ); 46 } 47 catch( IntrospectionException e) {} 49 51 return properties; } 53 private static final int EVENT_propertyChangeListener = 0; 55 56 ; 58 private static EventSetDescriptor[] getEdescriptor(){ 59 EventSetDescriptor[] eventSets = new EventSetDescriptor[1]; 60 61 try { 62 eventSets[EVENT_propertyChangeListener] = new EventSetDescriptor ( EjbRefConfigBean.class, "propertyChangeListener", java.beans.PropertyChangeListener .class, new String [] {"propertyChange"}, "addPropertyChangeListener", "removePropertyChangeListener" ); 63 } 64 catch( IntrospectionException e) {} 66 68 return eventSets; } 70 private static final int METHOD_getDConfigBean0 = 0; 72 private static final int METHOD_notifyDDChange1 = 1; 73 private static final int METHOD_removeDConfigBean2 = 2; 74 75 ; 77 private static MethodDescriptor[] getMdescriptor(){ 78 MethodDescriptor[] methods = new MethodDescriptor[3]; 79 80 try { 81 methods[METHOD_getDConfigBean0] = new MethodDescriptor ( EjbRefConfigBean.class.getMethod("getDConfigBean", new Class [] {javax.enterprise.deploy.model.DDBean .class})); 82 methods[METHOD_getDConfigBean0].setDisplayName ( "" ); 83 methods[METHOD_notifyDDChange1] = new MethodDescriptor ( EjbRefConfigBean.class.getMethod("notifyDDChange", new Class [] {javax.enterprise.deploy.model.XpathEvent .class})); 84 methods[METHOD_notifyDDChange1].setDisplayName ( "" ); 85 methods[METHOD_removeDConfigBean2] = new MethodDescriptor ( EjbRefConfigBean.class.getMethod("removeDConfigBean", new Class [] {javax.enterprise.deploy.spi.DConfigBean .class})); 86 methods[METHOD_removeDConfigBean2].setDisplayName ( "" ); 87 } 88 catch( Exception e) {} 90 92 return methods; } 94 95 private static final int defaultPropertyIndex = -1; private static final int defaultEventIndex = -1; 98 99 101 103 105 112 public BeanDescriptor getBeanDescriptor() { 113 return getBdescriptor(); 114 } 115 116 128 public PropertyDescriptor[] getPropertyDescriptors() { 129 return getPdescriptor(); 130 } 131 132 139 public EventSetDescriptor[] getEventSetDescriptors() { 140 return getEdescriptor(); 141 } 142 143 150 public MethodDescriptor[] getMethodDescriptors() { 151 return getMdescriptor(); 152 } 153 154 162 public int getDefaultPropertyIndex() { 163 return defaultPropertyIndex; 164 } 165 166 173 public int getDefaultEventIndex() { 174 return defaultEventIndex; 175 } 176 } 177 178 | Popular Tags |