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, proxy
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getObject, getService, getService, getService, proxy
public ServiceResourcesImpl(InternalRegistry registry, Module module, ServiceDef3 serviceDef, PlasticProxyFactory proxyFactory, org.slf4j.Logger logger)
public String getServiceId()
ServiceResources
getServiceId
in interface ServiceResources
public Class getServiceInterface()
ServiceResources
getServiceInterface
in interface ServiceResources
public Class getServiceImplementation()
ServiceResources
getServiceImplementation
in interface ServiceResources
public org.slf4j.Logger getLogger()
ServiceResources
getLogger
in interface ServiceResources
public <T> Collection<T> getUnorderedConfiguration(Class<T> valueType)
getUnorderedConfiguration
in interface ServiceBuilderResources
public <T> List<T> getOrderedConfiguration(Class<T> valueType)
getOrderedConfiguration
in interface ServiceBuilderResources
public <K,V> Map<K,V> getMappedConfiguration(Class<K> keyType, Class<V> valueType)
getMappedConfiguration
in interface ServiceBuilderResources
public Object getModuleBuilder()
ModuleBuilderSource
getModuleBuilder
in interface ModuleBuilderSource
public <T> T autobuild(String description, Class<T> clazz)
ObjectLocator
ObjectLocator.autobuild(Class)
that tracks the operation using
OperationTracker.invoke(String, org.apache.tapestry5.ioc.Invokable)
.autobuild
in interface ObjectLocator
autobuild
in class ObjectLocatorImpl
description
- description used with OperationTracker
clazz
- the type of object to instantiatepublic <T> T autobuild(Class<T> clazz)
ObjectLocator
Inject
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 ObjectLocator
autobuild
in class ObjectLocatorImpl
clazz
- the type of object to instantiatepublic OperationTracker getTracker()
ServiceResources
getTracker
in interface ServiceResources
public Class getImplementationClass()
public AnnotationProvider getClassAnnotationProvider()
AnnotationAccess
getClassAnnotationProvider
in interface AnnotationAccess
public AnnotationProvider getMethodAnnotationProvider(String methodName, Class... parameterTypes)
AnnotationAccess
getMethodAnnotationProvider
in interface AnnotationAccess
methodName
- the name of the method.parameterTypes
- the types of the parameters of the method.5.6.3 - Copyright © 2003-2021 The Apache Software Foundation.