com.sun.hk2.jsr330.spi.internal
Class Jsr330ConstructorWomb<T>
java.lang.Object
com.sun.hk2.component.AbstractInhabitantImpl<T>
com.sun.hk2.component.AbstractCreatorImpl<T>
com.sun.hk2.component.ConstructorCreator<T>
com.sun.hk2.component.ConstructorWomb<T>
com.sun.hk2.jsr330.spi.internal.Jsr330ConstructorWomb<T>
- All Implemented Interfaces:
- Holder<T>, Binding<T>, Factory<T>, ManagedComponentProvider<T>, Provider<T>, Releasable, Creator<T>, Inhabitant<T>
public class Jsr330ConstructorWomb<T>
- extends ConstructorWomb<T>
Jsr30 requires injection resolution for ctor(s)
- Since:
- 3.1
- Author:
- Jeff Trent
| Nested classes/interfaces inherited from interface com.sun.hk2.component.Holder |
Holder.Impl<T> |
| Methods inherited from class com.sun.hk2.component.AbstractInhabitantImpl |
companions, dispose, get, getAnnotation, getAnnotation, getAnnotations, getByType, getDescriptor, getDescriptorFor, getProvider, getProvider, getSerializedMetadata, getSerializedMetadata, lead, matches, setCompanions, toString |
| Methods inherited from interface org.jvnet.hk2.component.Creator |
get |
Jsr330ConstructorWomb
public Jsr330ConstructorWomb(Class<T> type,
Habitat habitat,
MultiMap<String,String> metadata)
createInjectionManager
protected InjectionManager createInjectionManager()
- Overrides:
createInjectionManager in class AbstractCreatorImpl<T>
create
public T create(Inhabitant onBehalfOf)
throws ComponentException
- First attempts to newInstance() as normal, then fails over to looking for @Inject ctor(s)
- Specified by:
create in interface Creator<T>- Overrides:
create in class ConstructorCreator<T>
- Throws:
ComponentException
createFromInjectedCtor
protected T createFromInjectedCtor()
getConstructor
protected Constructor<T> getConstructor()
throws Exception
- Determine the constructor to use.
- Throws:
Exception
getParameters
protected List<Object> getParameters(Constructor<T> ctor)
- Resolve the parameters for the selected ctor
initialize
public void initialize(T t,
Inhabitant onBehalfOf)
throws ComponentException
- Description copied from interface:
Creator
- Performs initialization of object, such as dependency injection.
- Specified by:
initialize in interface Creator<T>- Overrides:
initialize in class ConstructorCreator<T>
- Throws:
ComponentException
Copyright © 2012 Oracle Corporation. All Rights Reserved.