Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 4th, 2012  |  syntax: None  |  size: 0.22 KB  |  hits: 7  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. set POJO's setter using java.lang.reflect.Method
  2. LoginBean loginBean = new LoginBean();
  3. Method setUserName = loginBean.getClass().getMethod("setUserName", new Class[]{String.class});
  4. setUserName.invoke(loginBean, "myLogin");