else if (getMethodName1 == null && getMethodName2 == null) {   Method[] methods = beanClass.getMethods(); for (int i = 0; i < methods.length; i++) { if (methods[i].getName().equals(setMethodName) && methods[i].getParameterTypes().length == 1 && methods[i].getReturnType() == Void.TYPE) { setMethod = methods[i]; break; } } } } } catch (SecurityException e) {  String msg = "SecurityException thrown on attempt to access methods."; throw new IntrospectionException(msg); } }
	private void findMethods(Class beanClass, String getMethodName1, String getMethodName2, String setMethodName) throws IntrospectionException {		try {			if (getMethodName1 != null) {				try {					getMethod = beanClass.getMethod(getMethodName1, new Class[0]);				} catch (NoSuchMethodException E) {				}				if (getMethodName2 != null) {					if (getMethod != null && !getMethod.getReturnType().equals(java.lang.Boolean.TYPE)) {						// If the is() method exists but isn't boolean, we'll just go on and look for						// an ordinary get() method.						getMethod = null;					}					Method getMethod2;					try {						getMethod2 = beanClass.getMethod(getMethodName2, new Class[0]);					} catch (NoSuchMethodException E) {						getMethod2 = null;					}					if (getMethod2 != null) {						if (getMethod != null) {							if (!getMethod.getReturnType().equals(getMethod2.getReturnType())) {								throw new IntrospectionException(									"Both " + getMethodName1 + " and " + getMethodName2 + " exist, and have contradictory return types.");							}						} else {							getMethod = getMethod2;						}					}				}			}			if (getMethod != null) {				propertyType = getMethod.getReturnType();				if (setMethodName != null) {					Class[] setArgs = new Class[1];					setArgs[0] = propertyType;					try {						setMethod = beanClass.getMethod(setMethodName, setArgs);						if (!setMethod.getReturnType().equals(java.lang.Void.TYPE)) {							throw new IntrospectionException(setMethodName + " has non-void return type");						}					} catch (NoSuchMethodException E) {					}				}			} else if (setMethodName != null) {				Method[] m = beanClass.getMethods();				for (int i = 0; i < m.length; i++) {					Method current = m[i];					if (current.getName().equals(setMethodName)						&& current.getParameterTypes().length == 1						&& current.getReturnType().equals(java.lang.Void.TYPE)) {						if (setMethod != null) {							throw new IntrospectionException("Multiple, different set methods found that fit the bill!");						} else {							setMethod = current;							propertyType = current.getParameterTypes()[0];						}					}				}				if (setMethod == null) {					throw new IntrospectionException("Cannot find get or set methods.");				}			} else {				throw new IntrospectionException("Cannot find get or set methods.");			}		} catch (SecurityException E) {			throw new IntrospectionException("SecurityException thrown on attempt to access methods.");		}	}