com.github.dxee.dject.spi.LifecycleFeature Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dject-core Show documentation
Show all versions of dject-core Show documentation
A collection of guice extensions, help to improve the developer experience of guice.
package com.github.dxee.dject.spi;
import com.github.dxee.dject.lifecycle.LifecycleAction;
import java.util.List;
/**
* Each LifecycleFeature provides support for specific post constructor
* pre-@PostConstruct processing of an injected object. For example,
* ConfigurationLifecycleFeature enables configuration mapping
* prior to @PostConstruct being called.
*
* {@link LifecycleFeature}s are added via a multibinding. For example,
*
*
* {@code
* Multibinder.newSetBinder(binder(), LifecycleFeature.class).addBinding().to(ConfigurationLifecycleFeature.class);
* }
*
*
* @author elandau
*/
public interface LifecycleFeature {
/**
* Return a list of actions to perform on object of this type as part of
* lifecycle processing. Each LifecycleAction will likely be tied to processing
* of a specific field or method.
*
* @param type
* @return List of LifecycleAction
*/
List getActionsForType(Class type);
}