com.sun.hk2.component
Class ConstructorWomb<T>
java.lang.Object
com.sun.hk2.component.AbstractInhabitantImpl<T>
com.sun.hk2.component.AbstractWombImpl<T>
com.sun.hk2.component.ConstructorWomb<T>
- All Implemented Interfaces:
- Holder<T>, Inhabitant<T>, Womb<T>
public class ConstructorWomb<T>
- extends AbstractWombImpl<T>
Creates an object from its constructor.
- Author:
- Kohsuke Kawaguchi
Nested classes/interfaces inherited from interface com.sun.hk2.component.Holder |
Holder.Impl<T> |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.jvnet.hk2.component.Womb |
get |
ConstructorWomb
public ConstructorWomb(java.lang.Class<T> type,
Habitat habitat,
MultiMap<java.lang.String,java.lang.String> metadata)
create
public T create(Inhabitant onBehalfOf)
throws ComponentException
- Description copied from interface:
Womb
- Creates a new instance.
The caller is supposed to call the
Womb.initialize(Object, Inhabitant)
right away. This 2-phase initialization allows us to handle
cycle references correctly.
- Throws:
ComponentException
initialize
public void initialize(T t,
Inhabitant onBehalfOf)
throws ComponentException
- Description copied from interface:
Womb
- Performs initialization of object, such as dependency injection.
- Specified by:
initialize
in interface Womb<T>
- Overrides:
initialize
in class AbstractWombImpl<T>
- Throws:
ComponentException
Copyright © 2010 Oracle Corporation. All Rights Reserved.