
com.cookingfox.chefling.api.CheflingLifecycle Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of chefling-di-java Show documentation
Show all versions of chefling-di-java Show documentation
Chefling is a very minimal dependency injection container written in pure Java.
package com.cookingfox.chefling.api;
/**
* This interface provides methods that hook into the container instance creation process:
* - {@link #initialize()} is called right after an instance of the implementing class is created.
* This is when the class's dependencies have been resolved and additional initialization operations
* can be performed.
* - {@link #dispose()} is called just before an instance of the implementing class is destroyed.
* This destruction process is initiated when an instance is removed from the container. It provides
* a hook for cleaning up instance resources before it is destroyed.
*/
public interface CheflingLifecycle {
/**
* Dependencies have been resolved: perform additional initialization operations.
*/
void initialize();
/**
* Instance will be destroyed: perform clean-up operations.
*/
void dispose();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy