if(this.addListenerMethod == null || !this.addListenerMethod.getReturnType().equals(java.lang.Void.TYPE)) { throw new IntrospectionException("Add listener method does not exist, is not public, or is not void."); }
if (this.addListenerMethod == null || !this.addListenerMethod.getReturnType().equals(java.lang.Void.TYPE)) { throw new IntrospectionException( "Add listener method does not exist, is not public," + " or is not void."); }
	private void findMethods(Class eventSourceClass,		Class listenerType,		String listenerMethodNames[],		String addListenerMethodName,		String removeListenerMethodName,		String absurdEventClassCheckName) throws IntrospectionException {		/* Find add listener method and remove listener method. */		Class[] listenerArgList = new Class[1];		listenerArgList[0] = listenerType;		try {			this.addListenerMethod = eventSourceClass.getMethod(addListenerMethodName,listenerArgList);		} catch(SecurityException E) {			throw new IntrospectionException("SecurityException trying to access method " + addListenerMethodName + ".");		} catch(NoSuchMethodException E) {			throw new IntrospectionException("Could not find method " + addListenerMethodName + ".");		}		if(this.addListenerMethod == null || !this.addListenerMethod.getReturnType().equals(java.lang.Void.TYPE)) {			throw new IntrospectionException("Add listener method does not exist, is not public, or is not void.");		}		try {			this.removeListenerMethod = eventSourceClass.getMethod(removeListenerMethodName,listenerArgList);		} catch(SecurityException E) {			throw new IntrospectionException("SecurityException trying to access method " + removeListenerMethodName + ".");		} catch(NoSuchMethodException E) {			throw new IntrospectionException("Could not find method " + removeListenerMethodName + ".");		}		if(this.removeListenerMethod == null || !this.removeListenerMethod.getReturnType().equals(java.lang.Void.TYPE)) {			throw new IntrospectionException("Remove listener method does not exist, is not public, or is not void.");		}		/* Find the listener methods. */		Method[] methods;		try {			methods = ClassHelper.getAllMethods(listenerType);		} catch(SecurityException E) {			throw new IntrospectionException("Security: You cannot access fields in this class.");		}		Vector chosenMethods = new Vector();		boolean[] listenerMethodFound = new boolean[listenerMethodNames.length];		for(int i=0;i<methods.length;i++) {			if(Modifier.isPrivate(methods[i].getModifiers())) {				continue;			}			Method currentMethod = methods[i];			Class retval = currentMethod.getReturnType();			if(retval.equals(java.lang.Void.TYPE)) {				for(int j=0;j<listenerMethodNames.length;j++) {					if(currentMethod.getName().equals(listenerMethodNames[j])					   && (absurdEventClassCheckName == null					       || (currentMethod.getParameterTypes().length == 1					           && ((currentMethod.getParameterTypes()[0]).getName().equals(absurdEventClassCheckName)					               || (currentMethod.getParameterTypes()[0]).getName().endsWith("."+absurdEventClassCheckName)					              )					          )					      )					  ) {						chosenMethods.addElement(currentMethod);						listenerMethodFound[j] = true;					}				}			}		}		/* Make sure we found all the methods we were looking for. */		for(int i=0;i<listenerMethodFound.length;i++) {			if(!listenerMethodFound[i]) {				throw new IntrospectionException("Could not find event method " + listenerMethodNames[i]);			}		}		/* Now that we've chosen the listener methods we want, store them. */		this.listenerMethods = new Method[chosenMethods.size()];		for(int i=0;i<chosenMethods.size();i++) {			this.listenerMethods[i] = (Method)chosenMethods.elementAt(i);		}	}