List of usage examples for java.beans EventSetDescriptor getName
public String getName()
From source file:com.sun.faces.el.impl.BeanInfoManager.java
/** * Initializes by mapping property names to BeanInfoProperties *//*ww w . j ava 2 s . c om*/ void initialize() throws ElException { try { mBeanInfo = Introspector.getBeanInfo(mBeanClass); mPropertyByName = new HashMap(); mIndexedPropertyByName = new HashMap(); PropertyDescriptor[] pds = mBeanInfo.getPropertyDescriptors(); for (int i = 0; pds != null && i < pds.length; i++) { // Treat as both an indexed property and a normal property PropertyDescriptor pd = pds[i]; if (pd instanceof IndexedPropertyDescriptor) { IndexedPropertyDescriptor ipd = (IndexedPropertyDescriptor) pd; Method readMethod = getPublicMethod(ipd.getIndexedReadMethod()); Method writeMethod = getPublicMethod(ipd.getIndexedWriteMethod()); BeanInfoIndexedProperty property = new BeanInfoIndexedProperty(readMethod, writeMethod, ipd); mIndexedPropertyByName.put(ipd.getName(), property); } Method readMethod = getPublicMethod(pd.getReadMethod()); Method writeMethod = getPublicMethod(pd.getWriteMethod()); BeanInfoProperty property = new BeanInfoProperty(readMethod, writeMethod, pd); mPropertyByName.put(pd.getName(), property); } mEventSetByName = new HashMap(); EventSetDescriptor[] esds = mBeanInfo.getEventSetDescriptors(); for (int i = 0; esds != null && i < esds.length; i++) { EventSetDescriptor esd = esds[i]; mEventSetByName.put(esd.getName(), esd); } } catch (IntrospectionException exc) { if (log.isWarnEnabled()) { log.warn(MessageUtil.getMessageWithArgs(Constants.EXCEPTION_GETTING_BEANINFO, mBeanClass.getName()), exc); } } }
From source file:weka.gui.beans.TimeSeriesForecasting.java
/** * Returns true if, at this time, the object will accept a connection * according to the supplied EventSetDescriptor * /*from w w w . ja v a2 s . c o m*/ * @param esd the EventSetDescriptor * @return true if the object will accept a connection */ public boolean connectionAllowed(EventSetDescriptor esd) { return connectionAllowed(esd.getName()); }