com.sun.hk2.component
Class Inhabitants

java.lang.Object
  extended by com.sun.hk2.component.Inhabitants

Deprecated.

@Deprecated
public class Inhabitants
extends Object

Factory for Inhabitants.

Author:
Jeff Trent

Constructor Summary
Inhabitants()
          Deprecated.  
 
Method Summary
static
<T> Inhabitant<T>
create(Class<T> c, ServiceLocator habitat, Map<String,List<String>> metadata)
          Deprecated. Creates a Inhabitant by looking at annotations of the given type.
static
<T> Inhabitant<T>
create(T instance)
          Deprecated. Creates a singleton wrapper around existing object.
static Inhabitant<?> createInhabitant(ServiceLocator serviceLocator, Holder<ClassLoader> classLoader, String typeName, Map<String,List<String>> metadata, Inhabitant<?> lead, Set<String> indicies)
          Deprecated.  
static Inhabitant<?> createInhabitant(ServiceLocator serviceLocator, Iterator<InhabitantProviderInterceptor> interceptors, Holder<ClassLoader> classLoader, String typeName, Map<String,List<String>> metadata, Inhabitant<?> lead, InhabitantStore store, Set<String> indicies)
          Deprecated.  
static
<T> Collection<String>
getNamesFor(Inhabitant<T> i, String indexName)
          Deprecated. Returns the list of names the service implementation in known.
static
<T> Inhabitant<T>
wrapByScope(Class<T> c, Creator<T> creator, ServiceLocator habitat)
          Deprecated. Creates a Inhabitant by wrapping Creator to handle scoping right.
static
<T> Inhabitant<T>
wrapByScope(Creator<T> creator, ServiceLocator habitat, Class<? extends Scope> scopeClass)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Inhabitants

public Inhabitants()
Deprecated. 
Method Detail

createInhabitant

public static Inhabitant<?> createInhabitant(ServiceLocator serviceLocator,
                                             Holder<ClassLoader> classLoader,
                                             String typeName,
                                             Map<String,List<String>> metadata,
                                             Inhabitant<?> lead,
                                             Set<String> indicies)
Deprecated. 


createInhabitant

public static Inhabitant<?> createInhabitant(ServiceLocator serviceLocator,
                                             Iterator<InhabitantProviderInterceptor> interceptors,
                                             Holder<ClassLoader> classLoader,
                                             String typeName,
                                             Map<String,List<String>> metadata,
                                             Inhabitant<?> lead,
                                             InhabitantStore store,
                                             Set<String> indicies)
Deprecated. 

create

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


create

public static <T> Inhabitant<T> create(Class<T> c,
                                       ServiceLocator habitat,
                                       Map<String,List<String>> metadata)
Deprecated. 
Creates a Inhabitant by looking at annotations of the given type.


wrapByScope

public static <T> Inhabitant<T> wrapByScope(Class<T> c,
                                            Creator<T> creator,
                                            ServiceLocator habitat)
Deprecated. 
Creates a Inhabitant by wrapping Creator to handle scoping right.


wrapByScope

public static <T> Inhabitant<T> wrapByScope(Creator<T> creator,
                                            ServiceLocator habitat,
                                            Class<? extends Scope> scopeClass)
Deprecated. 

getNamesFor

public static <T> Collection<String> getNamesFor(Inhabitant<T> i,
                                                 String indexName)
Deprecated. 
Returns the list of names the service implementation in known. Services in hk2 are indexed by the contract name and an optional name. There can also be some aliasing so the same service can be known under different names.

Type Parameters:
T - contract type, optional
Parameters:
i - instance of inhabitant to obtain its registration name
indexName - the contract name this service is implementing
Returns:
a collection of names (usually there is only one) under which this service is registered for the passed contract name


Copyright © 2013 Oracle Corporation. All Rights Reserved.