title: Eclipse template variable for getter and setter
body: <p>I have a small question. I'm trying to create templates for getters for my variables inside of Eclipse. What I want to do in my getter method is to check if the variable is null or not. If it is null I want to assign a value to it. However the problem is I need to cast the return value of the method to the getter return type. I couldn't manage it. Here is the code that I'd like to have:</p>
  
  <pre><code>Integer someInt;
  Double someDoub;
  Long someLong;
  
  public Integer getSomeInt(){
      if(someInt == null) someInt = (Integer) new Generator().evaluate();
      return someInt;
  }
  
  public Double getSomeDoub(){
      if(someDoub == null) someDoub = (Double) new Generator().evaluate();
      return someDoub;
  }
  </code></pre>
  
  <p>This is the code that I want to generate.
  Here is what I typed as a template:</p>
  
  <pre><code>if( ${field} == null){
      ${field} = ( ${return_type} ) new Generator().evaluate();
  }
  return ${field};
  </code></pre>
  
  <p>As soon as I type this. Eclipse says that return_type is unknown. Please help.</p>
  
  <p>Thank you very much for your time.</p>