|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.glassfish.hk2.deprecated.utilities.Utilities
@Deprecated public class Utilities
Core utilities.
Constructor Summary | |
---|---|
Utilities()
Deprecated. |
Method Summary | ||
---|---|---|
static ActiveDescriptor<?> |
add(ServiceLocator locator,
Descriptor descriptor)
Deprecated. Bind the given descriptor to the given service locator. |
|
static
|
addIndex(ServiceLocator locator,
ActiveDescriptor<T> descriptor,
String contract,
String name)
Deprecated. Add an alternate index to look up the given descriptor. |
|
static DescriptorImpl |
createDescriptor(String typeName,
HK2Loader cl,
Map<String,List<String>> metadata)
Deprecated. Create a descriptor from the given type name. |
|
static List<? extends Descriptor> |
getAllDescriptorsByContract(ServiceLocator locator,
Class type)
Deprecated. Get all of the descriptors for the given contract type. |
|
static Descriptor |
getDescriptor(ServiceLocator locator,
Class type,
String name)
Deprecated. Get the best descriptor for the given class and name. |
|
static
|
getInhabitantFromActiveDescriptor(ActiveDescriptor<T> fromMe,
ServiceLocator locator)
Deprecated. Creates an Inhabitant from an ActiveDescriptor . |
|
|
getService(ServiceLocator locator,
Descriptor descriptor)
Deprecated. Get the service from the given service locator for the given descriptor. |
|
protected static Type |
getTypeClosure(Type ofType,
String contract)
Deprecated. Returns the type closure for the given contract. |
|
static boolean |
remove(ServiceLocator locator,
Filter filter)
Deprecated. Unbind the descriptor(s) found by the given filter from the given service locator. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Utilities()
Method Detail |
---|
public static ActiveDescriptor<?> add(ServiceLocator locator, Descriptor descriptor)
locator
- the service locator to bind todescriptor
- the descriptor that we are addingpublic static <T> void addIndex(ServiceLocator locator, ActiveDescriptor<T> descriptor, String contract, String name)
T
- the descriptor typelocator
- the service locator to associate this index withdescriptor
- the descriptor that we are adding the index forcontract
- the contract for the indexname
- the name for the indexpublic static boolean remove(ServiceLocator locator, Filter filter)
locator
- the service locatorfilter
- the filter used to find descriptor(s) that we are
unbinding
public static DescriptorImpl createDescriptor(String typeName, HK2Loader cl, Map<String,List<String>> metadata)
typeName
- the type namecl
- the loadermetadata
- the metadata
protected static Type getTypeClosure(Type ofType, String contract)
ofType
- the type to checkcontract
- the contract this type is allowed to handle
public static <T> Inhabitant<T> getInhabitantFromActiveDescriptor(ActiveDescriptor<T> fromMe, ServiceLocator locator)
Inhabitant
from an ActiveDescriptor
.
fromMe
- the Descriptor
to turn into an Inhabitant
locator
- the locator to use for the Inhabitant
Inhabitant
public static Descriptor getDescriptor(ServiceLocator locator, Class type, String name)
locator
- the service locatortype
- the typename
- the name
public static List<? extends Descriptor> getAllDescriptorsByContract(ServiceLocator locator, Class type)
locator
- the service locatortype
- the contract type
public <T> T getService(ServiceLocator locator, Descriptor descriptor)
T
- the type of the servicelocator
- the service locatordescriptor
- the descriptor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |