title: Java get property value by property name
body: <p>Is it possible in Java to get class property value by its name?
  for example, i have class like</p>
  
  <pre><code>public class Test {
      private String field;
      public String getField() {...}
      public void setField() {...}
  }
  </code></pre>
  
  <p>and another class with Map</p>
  
  <pre><code>public class Main {
      private static final Map&lt;String, Long&gt; map = new HashMap&lt;String, Long&gt;();
      static {
          map.put("field", new Long(1));
      }
      public void doSth() {
      Set&lt;String&gt; keys = map.keySet();
      Test t = new Test();
      for (String key : keys) {
      //t.getPropertyValueByName(key); ?
      }
      }
  </code></pre>