title: Creating a Spring enum bean and passing the value of a method call
body: <p>I have this Singleton:</p>
  
  <pre><code>   public enum Elvis {
         INSTANCE;
         private int age;
  
         public int getAge() {
             return age;
         }
     }
  </code></pre>
  
  <p>I know how to create the enum bean in spring:</p>
  
  <pre class="lang-xml prettyprint-override"><code>   &lt;bean id="elvis" class="com.xyz.Elvis" factory-method="valueOf"&gt;
             &lt;constructor-arg&gt;
                 &lt;value&gt;INSTANCE&lt;/value&gt;
             &lt;/constructor-arg&gt;
     &lt;/bean&gt; 
  </code></pre>
  
  <p>How do I pass the int returned by INSTANCE.getAge() into another beans constructor?</p>