Code example for InvocationTargetException

Methods: getTargetException

			throw new BeanInstantiationException(ctor.getDeclaringClass(),
					"Illegal arguments for constructor", ex);
		catch (InvocationTargetException ex) {
			throw new BeanInstantiationException(ctor.getDeclaringClass(),
					"Constructor threw exception", ex.getTargetException());
	 * Find a method with the given method name and the given parameter types, 
	 * declared on the given class or one of its superclasses. Prefers public methods, 
	 * but will return a protected, package access, or private method too. 
	 * <p>Checks {@code Class.getMethod} first, falling back to 
	 * {@code findDeclaredMethod}. This allows to find public methods 
	 * without issues even in environments with restricted Java security settings. 
	 * @param clazz the class to check 
	 * @param methodName the name of the method to find 
	 * @param paramTypes the parameter types of the method to find 
	 * @return the Method object, or {@code null} if not found