title: javax.lang.model: How do I get the type of a field?
body: <p>In <code>java.lang.reflect</code>, one would do:</p>
  
  <pre><code>Field someField = ...;
  Class&lt;?&gt; fieldType = someField.getType();
  </code></pre>
  
  <p>But what do I do with <code>javax.lang.model</code>'s <a href="http://download.oracle.com/javase/6/docs/api/javax/lang/model/element/VariableElement.html" rel="noreferrer"><strong><code>VariableElement</code></strong></a> (which may or may not represent a field)? A corresponding return value would be (I guess) <code>TypeElement</code>.</p>
  
  <pre><code>VariableElement someField = ...;
  TypeElement fieldType = someField.???;
  </code></pre>
  
  <p><strong>So, in <code>javax.lang.model</code>, how do I get the type (or <code>TypeElement</code>) of a field, represented by <code>VariableElement</code>?</strong></p>
  
  <p><em>BTW, there is not a single Stackoverflow-tag which would fit to javax.lang.model ;)</em></p>