T- type of unmanaged instances
public class Unmanaged<T> extends Object
Helper class for injecting and calling lifecycle callbacks unmanaged instances for use by framework and library integrators.
Unmanaged<Foo> unmanagedFoo = new Unmanaged<Foo>(Foo.class); UnmanagedInstance<Foo> fooInstance = unmanagedFoo.newInstance(); Foo foo = fooInstance.produce().inject().postConstruct().get(); ... // Use the foo instance fooInstance.preDestroy().dispose();
An instance of this class can be safely held for the lifetime of the application.
Unmanaged.UnmanagedInstances created by this class are not suitable for sharing between threads.
|Modifier and Type||Class and Description|
Represents a non-contextual instance.
|Constructor and Description|
Create an injector for the given class
Create an injector for the given class, using the current bean manager
|Modifier and Type||Method and Description|
Instantiate a new UnmanagedInstance
public Unmanaged(BeanManager manager, Class<T> clazz)
clazz- class of the unmanaged instances
Comments to: email@example.com.
Copyright © 2019 Eclipse Foundation.
Use is subject to license terms.