本文整理汇总了Java中java.beans.EventSetDescriptor.getListenerMethodDescriptors方法的典型用法代码示例。如果您正苦于以下问题:Java EventSetDescriptor.getListenerMethodDescriptors方法的具体用法?Java EventSetDescriptor.getListenerMethodDescriptors怎么用?Java EventSetDescriptor.getListenerMethodDescriptors使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.beans.EventSetDescriptor
的用法示例。
在下文中一共展示了EventSetDescriptor.getListenerMethodDescriptors方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: _createMergedEventSetDescriptor
import java.beans.EventSetDescriptor; //导入方法依赖的package包/类
private static EventSetDescriptor _createMergedEventSetDescriptor(
EventSetDescriptor secondaryDescriptor,
EventSetDescriptor primaryDescriptor
)
{
//
// merge the listener descriptors
//
MethodDescriptor[] listenerDescriptors =
primaryDescriptor.getListenerMethodDescriptors();
if (listenerDescriptors == null)
{
listenerDescriptors = secondaryDescriptor.getListenerMethodDescriptors();
}
// create the stub EvetnSetDescriptor
EventSetDescriptor mergedDescriptor = __createMergedEventSetStub(
primaryDescriptor,
listenerDescriptors);
//
// merge isDefaultEventSet
//
mergedDescriptor.setInDefaultEventSet(
primaryDescriptor.isInDefaultEventSet() &&
secondaryDescriptor.isInDefaultEventSet());
// merge the superclasses
_mergeFeatureDescriptors(secondaryDescriptor,
primaryDescriptor,
mergedDescriptor);
return mergedDescriptor;
}
示例2: testEventSetDescriptor
import java.beans.EventSetDescriptor; //导入方法依赖的package包/类
private static void testEventSetDescriptor() {
try {
MethodDescriptor[] array = { new MethodDescriptor(MyDPD.class.getMethod("getArray")) };
EventSetDescriptor descriptor = new EventSetDescriptor(null, null, array, null, null);
test(descriptor.getListenerMethodDescriptors());
array[0] = null;
test(descriptor.getListenerMethodDescriptors());
descriptor.getListenerMethodDescriptors()[0] = null;
test(descriptor.getListenerMethodDescriptors());
}
catch (Exception exception) {
throw new Error("unexpected error", exception);
}
}