org.jvnet.hk2.component
Class Inhabitants

java.lang.Object
  extended by org.jvnet.hk2.component.Inhabitants

public class Inhabitants
extends java.lang.Object

Factory for Inhabitant.

Author:
Kohsuke Kawaguchi

Constructor Summary
Inhabitants()
           
 
Method Summary
static
<T> Inhabitant<T>
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
<T> Inhabitant<T>
create(T instance)
          Creates a singleton wrapper around existing object.
static
<T> Inhabitant<T>
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

Inhabitants

public Inhabitants()
Method Detail

create

public static <T> Inhabitant<T> create(T instance)
Creates a singleton wrapper around existing object.


create

public static <T> Inhabitant<T> 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.


wrapByScope

public static <T> Inhabitant<T> wrapByScope(java.lang.Class<T> c,
                                            Womb<T> womb,
                                            Habitat habitat)
Creates a Inhabitant by wrapping Womb to handle scoping right.



Copyright © 2009 Sun Microsystems, Inc.. All Rights Reserved.