title: The exact alternative to init-method (Java-based)
body: <p>I can get a bean definition with this line of code:</p>
  
  <pre><code>BeanDefinitionRegistry bdr = (BeanDefinitionRegistry) context.getAutowireCapableBeanFactory();
  bdr.getBeanDefinition("myBean")
  </code></pre>
  
  <blockquote>
    <p>Generic bean: class [com.kciray.play.MyBean]; scope=singleton;
    abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0;
    autowireCandidate=true; primary=false; factoryBeanName=null;
    factoryMethodName=null; <strong>initMethodName=null;</strong> destroyMethodName=null</p>
  </blockquote>
  
  <p><strong>initMethodName</strong> is null when I use either <strong>@PostConstruct</strong> or <strong>InitializingBean.afterPropertiesSet</strong>. So, those aren't the exact alternatives to XML configuration (init-method="some"). </p>
  
  <p>I'd like to know <strong><em>the reason</em></strong> behind this tiny inconsistency. And the way to set init-method in Java, for learning sake.  </p>