title: Java JDT parser. Get variable type of VariableDeclarationFragment
body: <p>I've been implementing a Java parser with JDT and I can't figure out how to get a variable type when its node's type is <em>VariableDeclarationFragment</em>.</p>
  
  <p>I found out how to get a variable type only when it comes to <em>VariableDeclaration</em></p>
  
  <p>My code is the following. </p>
  
  <pre><code>public boolean visit(VariableDeclarationFragment node) {
      SimpleName name = node.getName();
  
      System.out.println("Declaration of '" + name + "' of type '??');
  
      return false; // do not continue 
  }
  </code></pre>
  
  <p>Can anyone help me?</p>