java.lang.Object
org.jvnet.hk2.internal.ServiceLocatorImpl
- All Implemented Interfaces:
ServiceLocator
- Author:
- jwells
-
Constructor Summary
ConstructorsConstructorDescriptionServiceLocatorImpl(String name, ServiceLocatorImpl parent) Called by the Generator, and hence must be a public method -
Method Summary
Modifier and TypeMethodDescriptionassistedInject(Object injectMe, Method method, MethodParameter... params) assistedInject(Object injectMe, Method method, ServiceHandle<?> root, MethodParameter... params) <T> T<T> T<U> UcreateAndInitialize(Class<U> createMe) Creates, injects and postConstructs, all in one<U> UcreateAndInitialize(Class<U> createMe, String strategy) Creates, injects and postConstructs, all in oneList<ServiceHandle<?>>getAllServiceHandles(Annotation qualifier, Annotation... qualifiers) <T> List<ServiceHandle<T>>getAllServiceHandles(Class<T> contractOrImpl, Annotation... qualifiers) List<ServiceHandle<?>>getAllServiceHandles(Type contractOrImpl, Annotation... qualifiers) List<ServiceHandle<?>>getAllServiceHandles(Filter searchCriteria) <T> List<T>getAllServices(Annotation qualifier, Annotation... qualifiers) <T> List<T>getAllServices(Class<T> contractOrImpl, Annotation... qualifiers) <T> List<T>getAllServices(Type contractOrImpl, Annotation... qualifiers) List<?>getAllServices(Filter searchCriteria) getBestDescriptor(Filter filter) List<ActiveDescriptor<?>>getDescriptors(Filter filter) getInjecteeDescriptor(Injectee injectee) longgetName()boolean<T> TgetService(Class<T> contractOrImpl, Annotation... qualifiers) <T> TgetService(Class<T> contractOrImpl, String name, Annotation... qualifiers) <T> TgetService(Type contractOrImpl, Annotation... qualifiers) <T> TgetService(Type contractOrImpl, String name, Annotation... qualifiers) <T> TgetService(ActiveDescriptor<T> activeDescriptor, ServiceHandle<?> root) Deprecated.<T> TgetService(ActiveDescriptor<T> activeDescriptor, ServiceHandle<?> root, Injectee originalRequest) <T> ServiceHandle<T>getServiceHandle(Class<T> contractOrImpl, Annotation... qualifiers) <T> ServiceHandle<T>getServiceHandle(Class<T> contractOrImpl, String name, Annotation... qualifiers) <T> ServiceHandle<T>getServiceHandle(Type contractOrImpl, Annotation... qualifiers) <T> ServiceHandle<T>getServiceHandle(Type contractOrImpl, String name, Annotation... qualifiers) <T> ServiceHandle<T>getServiceHandle(ActiveDescriptor<T> activeDescriptor) <T> ServiceHandle<T>getServiceHandle(ActiveDescriptor<T> activeDescriptor, Injectee injectee) getState()voidvoidbooleanvoidpostConstruct(Object postConstructMe) voidpostConstruct(Object postConstructMe, String strategy) voidpreDestroy(Object preDestroyMe) voidpreDestroy(Object preDestroyMe, String strategy) reifyDescriptor(Descriptor descriptor) reifyDescriptor(Descriptor descriptor, Injectee injectee) voidsetDefaultClassAnalyzerName(String defaultClassAnalyzer) voidsetDefaultUnqualified(Unqualified unqualified) voidsetNeutralContextClassLoader(boolean neutralContextClassLoader) voidshutdown()toString()
-
Constructor Details
-
ServiceLocatorImpl
Called by the Generator, and hence must be a public method- Parameters:
name- The name of this locatorparent- The parent of this locator (may be null)
-
-
Method Details
-
getDescriptors
- Specified by:
getDescriptorsin interfaceServiceLocator
-
getBestDescriptor
- Specified by:
getBestDescriptorin interfaceServiceLocator
-
reifyDescriptor
public ActiveDescriptor<?> reifyDescriptor(Descriptor descriptor, Injectee injectee) throws MultiException - Specified by:
reifyDescriptorin interfaceServiceLocator- Throws:
MultiException
-
reifyDescriptor
- Specified by:
reifyDescriptorin interfaceServiceLocator- Throws:
MultiException
-
getInjecteeDescriptor
- Specified by:
getInjecteeDescriptorin interfaceServiceLocator- Throws:
MultiException
-
getServiceHandle
public <T> ServiceHandle<T> getServiceHandle(ActiveDescriptor<T> activeDescriptor, Injectee injectee) throws MultiException - Specified by:
getServiceHandlein interfaceServiceLocator- Throws:
MultiException
-
getServiceHandle
public <T> ServiceHandle<T> getServiceHandle(ActiveDescriptor<T> activeDescriptor) throws MultiException - Specified by:
getServiceHandlein interfaceServiceLocator- Throws:
MultiException
-
getService
@Deprecated public <T> T getService(ActiveDescriptor<T> activeDescriptor, ServiceHandle<?> root) throws MultiException Deprecated.- Specified by:
getServicein interfaceServiceLocator- Throws:
MultiException
-
getService
public <T> T getService(ActiveDescriptor<T> activeDescriptor, ServiceHandle<?> root, Injectee originalRequest) throws MultiException - Specified by:
getServicein interfaceServiceLocator- Throws:
MultiException
-
getService
- Specified by:
getServicein interfaceServiceLocator- Throws:
MultiException
-
getService
- Specified by:
getServicein interfaceServiceLocator- Throws:
MultiException
-
getService
public <T> T getService(Class<T> contractOrImpl, String name, Annotation... qualifiers) throws MultiException - Specified by:
getServicein interfaceServiceLocator- Throws:
MultiException
-
getService
public <T> T getService(Type contractOrImpl, String name, Annotation... qualifiers) throws MultiException - Specified by:
getServicein interfaceServiceLocator- Throws:
MultiException
-
getAllServices
public <T> List<T> getAllServices(Class<T> contractOrImpl, Annotation... qualifiers) throws MultiException - Specified by:
getAllServicesin interfaceServiceLocator- Throws:
MultiException
-
getAllServices
public <T> List<T> getAllServices(Type contractOrImpl, Annotation... qualifiers) throws MultiException - Specified by:
getAllServicesin interfaceServiceLocator- Throws:
MultiException
-
getAllServices
public <T> List<T> getAllServices(Annotation qualifier, Annotation... qualifiers) throws MultiException - Specified by:
getAllServicesin interfaceServiceLocator- Throws:
MultiException
-
getAllServices
- Specified by:
getAllServicesin interfaceServiceLocator- Throws:
MultiException
-
getName
- Specified by:
getNamein interfaceServiceLocator
-
getState
- Specified by:
getStatein interfaceServiceLocator
-
isShutdown
public boolean isShutdown()- Specified by:
isShutdownin interfaceServiceLocator
-
shutdown
public void shutdown()- Specified by:
shutdownin interfaceServiceLocator
-
create
- Specified by:
createin interfaceServiceLocator
-
create
- Specified by:
createin interfaceServiceLocator
-
inject
- Specified by:
injectin interfaceServiceLocator
-
assistedInject
- Specified by:
assistedInjectin interfaceServiceLocator
-
assistedInject
public Object assistedInject(Object injectMe, Method method, ServiceHandle<?> root, MethodParameter... params) - Specified by:
assistedInjectin interfaceServiceLocator
-
inject
- Specified by:
injectin interfaceServiceLocator
-
postConstruct
- Specified by:
postConstructin interfaceServiceLocator
-
postConstruct
- Specified by:
postConstructin interfaceServiceLocator
-
preDestroy
- Specified by:
preDestroyin interfaceServiceLocator
-
preDestroy
- Specified by:
preDestroyin interfaceServiceLocator
-
createAndInitialize
Creates, injects and postConstructs, all in one- Specified by:
createAndInitializein interfaceServiceLocator
-
createAndInitialize
Creates, injects and postConstructs, all in one- Specified by:
createAndInitializein interfaceServiceLocator
-
getServiceHandle
public <T> ServiceHandle<T> getServiceHandle(Class<T> contractOrImpl, Annotation... qualifiers) throws MultiException - Specified by:
getServiceHandlein interfaceServiceLocator- Throws:
MultiException
-
getServiceHandle
public <T> ServiceHandle<T> getServiceHandle(Type contractOrImpl, Annotation... qualifiers) throws MultiException - Specified by:
getServiceHandlein interfaceServiceLocator- Throws:
MultiException
-
getAllServiceHandles
public <T> List<ServiceHandle<T>> getAllServiceHandles(Class<T> contractOrImpl, Annotation... qualifiers) throws MultiException - Specified by:
getAllServiceHandlesin interfaceServiceLocator- Throws:
MultiException
-
getAllServiceHandles
public List<ServiceHandle<?>> getAllServiceHandles(Type contractOrImpl, Annotation... qualifiers) throws MultiException - Specified by:
getAllServiceHandlesin interfaceServiceLocator- Throws:
MultiException
-
getServiceHandle
public <T> ServiceHandle<T> getServiceHandle(Class<T> contractOrImpl, String name, Annotation... qualifiers) throws MultiException - Specified by:
getServiceHandlein interfaceServiceLocator- Throws:
MultiException
-
getServiceHandle
public <T> ServiceHandle<T> getServiceHandle(Type contractOrImpl, String name, Annotation... qualifiers) throws MultiException - Specified by:
getServiceHandlein interfaceServiceLocator- Throws:
MultiException
-
getAllServiceHandles
- Specified by:
getAllServiceHandlesin interfaceServiceLocator- Throws:
MultiException
-
getAllServiceHandles
public List<ServiceHandle<?>> getAllServiceHandles(Annotation qualifier, Annotation... qualifiers) throws MultiException - Specified by:
getAllServiceHandlesin interfaceServiceLocator- Throws:
MultiException
-
getLocatorId
public long getLocatorId()- Specified by:
getLocatorIdin interfaceServiceLocator
-
getDefaultClassAnalyzerName
- Specified by:
getDefaultClassAnalyzerNamein interfaceServiceLocator
-
setDefaultClassAnalyzerName
- Specified by:
setDefaultClassAnalyzerNamein interfaceServiceLocator
-
getDefaultUnqualified
- Specified by:
getDefaultUnqualifiedin interfaceServiceLocator
-
setDefaultUnqualified
- Specified by:
setDefaultUnqualifiedin interfaceServiceLocator
-
getParent
- Specified by:
getParentin interfaceServiceLocator
-
getNeutralContextClassLoader
public boolean getNeutralContextClassLoader()- Specified by:
getNeutralContextClassLoaderin interfaceServiceLocator
-
setNeutralContextClassLoader
public void setNeutralContextClassLoader(boolean neutralContextClassLoader) - Specified by:
setNeutralContextClassLoaderin interfaceServiceLocator
-
toString
-