public class ServiceResourcesImpl extends ObjectLocatorImpl implements ServiceBuilderResources
ServiceBuilderResources. We just have one
implementation that fills the purposes of methods that need a ServiceResources
(which includes service decorator methods) as well as methods that need a
ServiceBuilderResources (which is just service builder methods). Since it is most
commonly used for the former, we'll just leave the name as ServiceResourcesImpl.| Constructor and Description |
|---|
ServiceResourcesImpl(InternalRegistry registry,
Module module,
ServiceDef3 serviceDef,
PlasticProxyFactory proxyFactory,
org.slf4j.Logger logger) |
| Modifier and Type | Method and Description |
|---|---|
<T> T |
autobuild(Class<T> clazz)
Autobuilds a class by finding the public constructor with the most parameters.
|
<T> T |
autobuild(String description,
Class<T> clazz)
Preferred version of
ObjectLocator.autobuild(Class) that tracks the operation using
OperationTracker.invoke(String, org.apache.tapestry5.ioc.Invokable). |
AnnotationProvider |
getClassAnnotationProvider()
Returns a provider for annotations on the service class and interface.
|
Class |
getImplementationClass() |
org.slf4j.Logger |
getLogger()
Returns a Logger appropriate for logging messages.
|
<K,V> Map<K,V> |
getMappedConfiguration(Class<K> keyType,
Class<V> valueType) |
AnnotationProvider |
getMethodAnnotationProvider(String methodName,
Class... parameterTypes)
Returns a provider for annotations of a method of the class.
|
Object |
getModuleBuilder()
Returns the instantiated version of the Tapestry IoC module class.
|
<T> List<T> |
getOrderedConfiguration(Class<T> valueType) |
String |
getServiceId()
Returns the fully qualified id of the service.
|
Class |
getServiceImplementation()
Returns the service implementation.
|
Class |
getServiceInterface()
Returns the service interface implemented by the service.
|
OperationTracker |
getTracker()
Returns an object that can be used to track operations related to constructing, configuring, decorating and
initializing the service.
|
<T> Collection<T> |
getUnorderedConfiguration(Class<T> valueType) |
getObject, getService, getService, getService, proxyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetObject, getService, getService, getService, proxypublic ServiceResourcesImpl(InternalRegistry registry, Module module, ServiceDef3 serviceDef, PlasticProxyFactory proxyFactory, org.slf4j.Logger logger)
public String getServiceId()
ServiceResourcesgetServiceId in interface ServiceResourcespublic Class getServiceInterface()
ServiceResourcesgetServiceInterface in interface ServiceResourcespublic Class getServiceImplementation()
ServiceResourcesgetServiceImplementation in interface ServiceResourcespublic org.slf4j.Logger getLogger()
ServiceResourcesgetLogger in interface ServiceResourcespublic <T> Collection<T> getUnorderedConfiguration(Class<T> valueType)
getUnorderedConfiguration in interface ServiceBuilderResourcespublic <T> List<T> getOrderedConfiguration(Class<T> valueType)
getOrderedConfiguration in interface ServiceBuilderResourcespublic <K,V> Map<K,V> getMappedConfiguration(Class<K> keyType, Class<V> valueType)
getMappedConfiguration in interface ServiceBuilderResourcespublic Object getModuleBuilder()
ModuleBuilderSourcegetModuleBuilder in interface ModuleBuilderSourcepublic <T> T autobuild(String description, Class<T> clazz)
ObjectLocatorObjectLocator.autobuild(Class) that tracks the operation using
OperationTracker.invoke(String, org.apache.tapestry5.ioc.Invokable).autobuild in interface ObjectLocatorautobuild in class ObjectLocatorImpldescription - description used with OperationTrackerclazz - the type of object to instantiatepublic <T> T autobuild(Class<T> clazz)
ObjectLocatorInject annotation. There are two cases: constructing a service implementation, and constructing
an arbitrary object. In the former case, many service resources are also available for injection, not
just dependencies or objects provided via the MasterObjectProvider service.autobuild in interface ObjectLocatorautobuild in class ObjectLocatorImplclazz - the type of object to instantiatepublic OperationTracker getTracker()
ServiceResourcesgetTracker in interface ServiceResourcespublic Class getImplementationClass()
public AnnotationProvider getClassAnnotationProvider()
AnnotationAccessgetClassAnnotationProvider in interface AnnotationAccesspublic AnnotationProvider getMethodAnnotationProvider(String methodName, Class... parameterTypes)
AnnotationAccessgetMethodAnnotationProvider in interface AnnotationAccessmethodName - the name of the method.parameterTypes - the types of the parameters of the method.5.6.4 - Copyright © 2003-2021 The Apache Software Foundation.