public Method getEventMethod ( Class controlInterface ) { // // If we already hold a method reference and its loader matches up with the input // interface, then just return it. // if ( _method != null && _method . getDeclaringClass ( ) . getClassLoader ( ) . equals ( controlInterface . getClassLoader ( ) ) ) return _method ; // // Otherwise, obtain the mapping from descriptors to methods, and use it to // convert back to a method. // String eventDescriptor = getEventDescriptor ( controlInterface ) ; HashMap < String , Method > descriptorMap = getDescriptorMap ( controlInterface ) ; if ( ! descriptorMap . containsKey ( eventDescriptor ) ) { throw new IllegalArgumentException ( "Control interface " + controlInterface + " does not contain an event method that " + " corresponds to " + eventDescriptor ) ; } return descriptorMap . get ( eventDescriptor ) ; }
Returns the event Method associated with this EventRef .