T
- the type of the CDI instance to createpublic static class Unmanaged.UnmanagedInstance<T> extends Object
InjectionTarget
interfaceModifier and Type | Method and Description |
---|---|
Unmanaged.UnmanagedInstance<T> |
dispose()
Dispose the CDI instance.
|
T |
get()
This method should only get called after the
CDI instance got properly produced and initialized
via
produce()
inject()
postConstruct() |
Unmanaged.UnmanagedInstance<T> |
inject()
Fill @inject field, constructor and methods.
|
Unmanaged.UnmanagedInstance<T> |
postConstruct()
Invoke any @PostConstruct methods.
|
Unmanaged.UnmanagedInstance<T> |
preDestroy()
Invoke any @PreDestroy annotated methods
and interceptors of the given CDI instance.
|
Unmanaged.UnmanagedInstance<T> |
produce()
Create the CDI instance itself.
|
public Unmanaged.UnmanagedInstance<T> produce()
Producer.produce(javax.enterprise.context.spi.CreationalContext)
and performs a few checks upfront.IllegalStateException
- if the instance already got createdIllegalStateException
- if the instance already got disposedpublic Unmanaged.UnmanagedInstance<T> inject()
IllegalStateException
- if the instance was not yet createdIllegalStateException
- if the instance already got injectedIllegalStateException
- if the instance already got disposedInjectionTarget.inject(Object, javax.enterprise.context.spi.CreationalContext)
public Unmanaged.UnmanagedInstance<T> postConstruct()
InjectionTarget.postConstruct(Object)
public T get()
produce()
inject()
postConstruct()
public Unmanaged.UnmanagedInstance<T> preDestroy()
public Unmanaged.UnmanagedInstance<T> dispose()
preDestroy()
before
this method.Producer.dispose(Object)
Copyright © 2019. All rights reserved.