Package org.int4.dirk.spi.scope
Interface CreationalContext<T>
-
- Type Parameters:
T- the type of instance this context can produce
public interface CreationalContext<T>Context used to create and destroy instances with injection information.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Tget()Gets an instance of typeT.voidrelease()Releases this context.
-
-
-
Method Detail
-
get
T get()
Gets an instance of typeT.Throws
IllegalStateExceptionwhen the context was released.- Returns:
- an instance of type
T, can benull - Throws:
java.lang.IllegalStateException- when the context was released
-
release
void release()
Releases this context. Any dependent objects associated with it will be destroyed. This method is idempotent.
-
-