code: protected void lifecycle(BindRegistry registry, BeanDefinitionRegistry definitionRegistry) {
      for (String name : registry.getBeanNames()) {
        Class<?> clazz = registry.getBeanType(name);
  
        String springName = name;
        if (springName.startsWith("&")) springName = springName.substring(1);
        if (!definitionRegistry.containsBeanDefinition(springName)) continue;
  
        AbstractBeanDefinition def = (AbstractBeanDefinition) definitionRegistry.getBeanDefinition(springName);
        if (Initializing.class.isAssignableFrom(clazz) && null == def.getInitMethodName()
            && !def.getPropertyValues().contains("init-method")) {
          def.setInitMethodName("init");
        }
        if (Disposable.class.isAssignableFrom(clazz) && null == def.getDestroyMethodName()
            && !def.getPropertyValues().contains("destroy-method")) {
          def.setDestroyMethodName("destroy");
        }
      }
    }
docs: <p>
  lifecycle.
  </p>
  
  @param registry a {@link org.beangle.commons.inject.bind.BindRegistry} object.
  @param definitionRegistry a
  {@link org.springframework.beans.factory.support.BeanDefinitionRegistry} object.