|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jvnet.hk2.component.Inhabitants
public class Inhabitants
Factory for Inhabitant
.
Constructor Summary | |
---|---|
Inhabitants()
|
Method Summary | ||
---|---|---|
static
|
create(java.lang.Class<T> c,
Habitat habitat,
MultiMap<java.lang.String,java.lang.String> metadata)
Creates a Inhabitant by looking at annotations of the given type. |
|
static
|
create(T instance)
Creates a singleton wrapper around existing object. |
|
static
|
getIndexes(Inhabitant<T> i)
Calculate the list of indexes under which the inhabitant is registered. |
|
static
|
getNamesFor(Inhabitant<T> i,
java.lang.String indexName)
Returns the list of names the service implementation in known. |
|
static
|
wrapByScope(java.lang.Class<T> c,
Womb<T> womb,
Habitat habitat)
Creates a Inhabitant by wrapping Womb to handle scoping right. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Inhabitants()
Method Detail |
---|
public static <T> Inhabitant<T> create(T instance)
public static <T> Inhabitant<T> create(java.lang.Class<T> c, Habitat habitat, MultiMap<java.lang.String,java.lang.String> metadata)
Inhabitant
by looking at annotations of the given type.
public static <T> Inhabitant<T> wrapByScope(java.lang.Class<T> c, Womb<T> womb, Habitat habitat)
Inhabitant
by wrapping Womb
to handle scoping right.
public static <T> java.util.Collection<java.lang.String> getIndexes(Inhabitant<T> i)
T
- Contract type, optionali
- instance of inhabitant to obtain the indexes from
public static <T> java.util.Collection<java.lang.String> getNamesFor(Inhabitant<T> i, java.lang.String indexName)
T
- contract type, optionali
- instance of inhabitant to obtain its registration nameindexName
- the contract name this service is implementing
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |