Class ServiceDefImpl
java.lang.Object
org.apache.tapestry5.ioc.internal.ServiceDefImpl
- All Implemented Interfaces:
AnnotationAccess,ServiceDef,ServiceDef2,ServiceDef3
-
Method Summary
Modifier and TypeMethodDescriptioncreateServiceCreator(ServiceBuilderResources resources) Returns anObjectCreatorthat can create the core service implementation.booleanReturns a provider for annotations on the service class and interface.Returns an optional set of marker annotations.getMethodAnnotationProvider(String methodName, Class... argumentTypes) Returns a provider for annotations of a method of the class.Returns the service id, derived from the method name or the unqualified service interface name.Returns the service implementation associated with this service.Returns the service interface associated with this service.Returns the lifecycle defined for the service.inthashCode()booleanReturns true if the service should be eagerly loaded at Registry startup.booleanReturns true if the service should not be decorated.toString()
-
Method Details
-
toString
-
createServiceCreator
Description copied from interface:ServiceDefReturns anObjectCreatorthat can create the core service implementation.- Specified by:
createServiceCreatorin interfaceServiceDef- Parameters:
resources- used to resolve dependencies of the service, or access its configuration- Returns:
- an object that can (later) be used to instantiate the service itself
-
getServiceId
Description copied from interface:ServiceDefReturns the service id, derived from the method name or the unqualified service interface name. Service ids must be unique among all services in all modules. Service ids are used in a heavy handed way to support ultimate disambiguation, but their primary purpose is to support service contribution methods.- Specified by:
getServiceIdin interfaceServiceDef
-
getServiceInterface
Description copied from interface:ServiceDefReturns the service interface associated with this service. This is the interface exposed to the outside world, as well as the one used to build proxies. In cases where the service is not defined in terms of an interface, this will return the actual implementation class of the service. Services without a true service interface are not proxied, which has a number of ramifications (such as losing lazy instantiation capabilities and other more interesting lifecycles).- Specified by:
getServiceInterfacein interfaceServiceDef
-
getServiceImplementation
Description copied from interface:ServiceDef3Returns the service implementation associated with this service. When creating the proxies for the service interface, the implementation of the service interface methods will receive the annotations of the corresponding method in the service interface.- Specified by:
getServiceImplementationin interfaceServiceDef3
-
getServiceScope
Description copied from interface:ServiceDefReturns the lifecycle defined for the service. This is indicated by adding aScopeannotation to the service builder method for the service. Services that are not proxied will ignore their scope; such services are always treated as singletons.- Specified by:
getServiceScopein interfaceServiceDef- See Also:
-
isEagerLoad
Description copied from interface:ServiceDefReturns true if the service should be eagerly loaded at Registry startup.- Specified by:
isEagerLoadin interfaceServiceDef- See Also:
-
getMarkers
Description copied from interface:ServiceDefReturns an optional set of marker annotations. Marker annotations are used to disambiguate services; the combination of a marker annotation and a service type is expected to be unique. The annotation is placed on the field or method/constructor parameter and the service is located by combining the marker with service type (the parameter or field type).- Specified by:
getMarkersin interfaceServiceDef- Returns:
- the marker annotations for the service (possibly empty), including any default marker annotations from the containing module.
-
isPreventDecoration
Description copied from interface:ServiceDef2Returns true if the service should not be decorated. Most services allow decoration, unless thePreventServiceDecorationannotation is present.- Specified by:
isPreventDecorationin interfaceServiceDef2
-
getClassAnnotationProvider
Description copied from interface:AnnotationAccessReturns a provider for annotations on the service class and interface. This will reflect annotations defined by the implementation class itself, plus annotations defined by the service interface (implementation class annotations take precedence).- Specified by:
getClassAnnotationProviderin interfaceAnnotationAccess- Returns:
- an AnnotationProvider instance.
-
getMethodAnnotationProvider
Description copied from interface:AnnotationAccessReturns a provider for annotations of a method of the class. This includes annotations on the implementation method, plus annotations on the corresponding service interface method (if such a method exists), with precedence on the implementation class method annotations.- Specified by:
getMethodAnnotationProviderin interfaceAnnotationAccess- Parameters:
methodName- the name of the method.argumentTypes- the types of the parameters of the method.- Returns:
- an AnnotationProvider instance. *
-
hashCode
-
equals
-