當前位置: 首頁>>代碼示例>>Java>>正文


Java EventSetDescriptor.getName方法代碼示例

本文整理匯總了Java中java.beans.EventSetDescriptor.getName方法的典型用法代碼示例。如果您正苦於以下問題:Java EventSetDescriptor.getName方法的具體用法?Java EventSetDescriptor.getName怎麽用?Java EventSetDescriptor.getName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在java.beans.EventSetDescriptor的用法示例。


在下文中一共展示了EventSetDescriptor.getName方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: _addEvent

import java.beans.EventSetDescriptor; //導入方法依賴的package包/類
private void _addEvent(
  Hashtable<String, EventSetDescriptor> events,
  EventSetDescriptor descriptor
  )
{
  String key = descriptor.getName() + descriptor.getListenerType();

  if (descriptor.getName().equals("propertyChange"))
  {
    _propertyChangeSource = true;
  }

  EventSetDescriptor oldDescriptor = events.get(key);

  if (oldDescriptor == null)
  {
    events.put(key, descriptor);
    return;
  }

  EventSetDescriptor composite = _createMergedEventSetDescriptor(
                                                             oldDescriptor,
                                                             descriptor);
  events.put(key, composite);
}
 
開發者ID:apache,項目名稱:myfaces-trinidad,代碼行數:26,代碼來源:JavaIntrospector.java

示例2: __createMergedEventSetStub

import java.beans.EventSetDescriptor; //導入方法依賴的package包/類
static EventSetDescriptor __createMergedEventSetStub(
  EventSetDescriptor oldDescriptor,
  MethodDescriptor[] listenerDescriptors
  )
{
  try
  {
    EventSetDescriptor stubDescriptor = new EventSetDescriptor(
                                  oldDescriptor.getName(),
                                  oldDescriptor.getListenerType(),
                                  listenerDescriptors,
                                  oldDescriptor.getAddListenerMethod(),
                                  oldDescriptor.getRemoveListenerMethod());

    // set the unicast attribute
    stubDescriptor.setUnicast(oldDescriptor.isUnicast());

    return stubDescriptor;
  }
  catch (Exception e)
  {
    //    _LOG.severe(e);
    return null;
  }
}
 
開發者ID:apache,項目名稱:myfaces-trinidad,代碼行數:26,代碼來源:JavaIntrospector.java

示例3: BeanConnection

import java.beans.EventSetDescriptor; //導入方法依賴的package包/類
/**
 * Creates a new <code>BeanConnection</code> instance.
 * 
 * @param source the source bean
 * @param target the target bean
 * @param esd the EventSetDescriptor for the connection be displayed
 */
public BeanConnection(BeanInstance source, BeanInstance target,
  EventSetDescriptor esd, Integer... tab) {

  int tabIndex = 0;
  if (tab.length > 0) {
    tabIndex = tab[0].intValue();
  }

  Vector<BeanConnection> connections = TABBED_CONNECTIONS.get(tabIndex);

  m_source = source;
  m_target = target;
  // m_sourceEsd = sourceEsd;
  m_eventName = esd.getName();
  // System.err.println(m_eventName);

  // attempt to connect source and target beans
  Method registrationMethod =
  // m_sourceEsd.getAddListenerMethod();
  // getSourceEventSetDescriptor().getAddListenerMethod();
  esd.getAddListenerMethod();
  Object targetBean = m_target.getBean();

  Object[] args = new Object[1];
  args[0] = targetBean;
  Class<?> listenerClass = esd.getListenerType();
  if (listenerClass.isInstance(targetBean)) {
    try {
      registrationMethod.invoke(m_source.getBean(), args);
      // if the target implements BeanCommon, then inform
      // it that it has been registered as a listener with a source via
      // the named listener interface
      if (targetBean instanceof BeanCommon) {
        ((BeanCommon) targetBean).connectionNotification(esd.getName(),
          m_source.getBean());
      }
      connections.addElement(this);
    } catch (Exception ex) {
      System.err.println("[BeanConnection] Unable to connect beans");
      ex.printStackTrace();
    }
  } else {
    System.err.println("[BeanConnection] Unable to connect beans");
  }
}
 
開發者ID:mydzigear,項目名稱:repo.kmeanspp.silhouette_score,代碼行數:53,代碼來源:BeanConnection.java

示例4: eventGeneratable

import java.beans.EventSetDescriptor; //導入方法依賴的package包/類
/**
 * Returns true, if at the current time, the event described by the supplied
 * event descriptor could be generated.
 * 
 * @param esd an <code>EventSetDescriptor</code> value
 * @return a <code>boolean</code> value
 */
public boolean eventGeneratable(EventSetDescriptor esd) {
  String eventName = esd.getName();
  return eventGeneratable(eventName);
}
 
開發者ID:mydzigear,項目名稱:repo.kmeanspp.silhouette_score,代碼行數:12,代碼來源:Classifier.java


注:本文中的java.beans.EventSetDescriptor.getName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。