Package org.jboss.cdi.tck.util
Class DependentInstance<T>
- java.lang.Object
-
- org.jboss.cdi.tck.util.DependentInstance<T>
-
- Type Parameters:
T-
public class DependentInstance<T> extends Object
Simple helper class for creating and destroying dependent contextual instances.- Author:
- Martin Kouba
-
-
Constructor Summary
Constructors Constructor Description DependentInstance(jakarta.enterprise.inject.spi.BeanManager beanManager, Class<T> beanType, Annotation... qualifiers)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DependentInstance<T>destroy()Destroy the created instance properly.Tget()booleanisDestroyed()
-
-
-
Constructor Detail
-
DependentInstance
public DependentInstance(jakarta.enterprise.inject.spi.BeanManager beanManager, Class<T> beanType, Annotation... qualifiers)
-
-
Method Detail
-
get
public T get()
- Returns:
- the created instance
-
destroy
public DependentInstance<T> destroy()
Destroy the created instance properly.- Returns:
- self
-
isDestroyed
public boolean isDestroyed()
- Returns:
trueif destroyed,falseotherwise
-
-