Issue in code while invoking selenium web driver method 'findElement' using java reflection api
===

I tried with selenium web driver to get the WebElement using method **findElement**. it worked. but had the issue with reflection api, when i was trying to invoke the method **findElement** and argument as By.name("") to get WebElement in return. here the following lines can give more idea about issue.<br/><br/>
**Javaw was throwing the exception that** <br/>
*<blockquote>java.lang.NoSuchMethodException: org.openqa.selenium.firefox.FirefoxDriver.findElement(org.openqa.selenium.By$ByName)
	at java.lang.Class.getMethod(Unknown Source)</blockquote>*
<hr/>
*Tried in general Approach (Working)*
<pre><code>

    WebDriver driver = new FirefoxDriver();
    Method[] methods = driver.getClass().getMethods();
    for(Method method:methods){
    	System.out.println(method.getName());
    }
    driver.manage().window().maximize();
    driver.get("http://www.facebook.com/");
    By by = By.name("email");
    WebElement element = driver.findElement(by);

</pre></code>
*Implemented using Java reflection api (Exception occured through follwoing code)*
<pre><code>

    WebDriver driver = new FirefoxDriver();
    Method[] methods = driver.getClass().getMethods();
    for(Method method:methods){
    	System.out.println(method.getName());
    }
    driver.manage().window().maximize();
    driver.get("http://www.facebook.com/");
    By by = By.name("email");
    Class c = Class.forName(driver.getClass().getName());
    Method getMethod = c.getMethod("findElement", new Class[]{by.getClass()});
    getMethod.setAccessible(true);
    WebElement element = (WebElement) getMethod.invoke(getMethod, by);

</pre></code>
<hr/>
Please some one can guide to get work done of code using reflection api