Class 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 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:
        true if destroyed, false otherwise