Class DefaultModuleDefImpl
java.lang.Object
org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl
- All Implemented Interfaces:
ModuleDef
,ModuleDef2
,ServiceDefAccumulator
Starting from the Class for a module, identifies all the services (service builder methods),
decorators (service
decorator methods) and (not yet implemented) contributions (service contributor methods).
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultModuleDefImpl
(Class<?> moduleClass, org.slf4j.Logger logger, PlasticProxyFactory proxyFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addServiceDef
(ServiceDef serviceDef) Returns all the service advisor definitions built/provided by this module.Returns the class that will be instantiated.Returns all the contribution definitions built/provided by this module.Returns all the decorator definitions built/provided by this module.Returns the name used to create aLogger
instance.getServiceDef
(String serviceId) Returns a service definition via the service's id.Returns the ids of the services built/provided by the module.Methods marked with @Startup are converted into Runnable instances and assigned here.toString()
Identifies the module class and a list of service ids within the module.
-
Constructor Details
-
DefaultModuleDefImpl
public DefaultModuleDefImpl(Class<?> moduleClass, org.slf4j.Logger logger, PlasticProxyFactory proxyFactory) - Parameters:
moduleClass
- the class that is responsible for building services, etc.logger
- based on the class name of the moduleproxyFactory
- factory used to create proxy classes at runtime
-
-
Method Details
-
toString
Identifies the module class and a list of service ids within the module. -
getBuilderClass
Description copied from interface:ModuleDef
Returns the class that will be instantiated. Annotated instance methods of this class are invoked to build services, to decorate/intercept services, and make contributions to other services. Note: this name is maintained for compatibilty; the term "module builder" is now just "module class".- Specified by:
getBuilderClass
in interfaceModuleDef
-
getServiceIds
Description copied from interface:ModuleDef
Returns the ids of the services built/provided by the module.- Specified by:
getServiceIds
in interfaceModuleDef
-
getServiceDef
Description copied from interface:ModuleDef
Returns a service definition via the service's id. Ideally, the returned value should be an instance ofServiceDef2
, and will be converted to such if necessary.- Specified by:
getServiceDef
in interfaceModuleDef
- Parameters:
serviceId
- the id of the service to retrieve (case is ignored)- Returns:
- service definition or null if it doesn't exist
-
addServiceDef
- Specified by:
addServiceDef
in interfaceServiceDefAccumulator
-
getDecoratorDefs
Description copied from interface:ModuleDef
Returns all the decorator definitions built/provided by this module.- Specified by:
getDecoratorDefs
in interfaceModuleDef
-
getContributionDefs
Description copied from interface:ModuleDef
Returns all the contribution definitions built/provided by this module.- Specified by:
getContributionDefs
in interfaceModuleDef
-
getLoggerName
Description copied from interface:ModuleDef
Returns the name used to create aLogger
instance. This is typically the builder class name.- Specified by:
getLoggerName
in interfaceModuleDef
-
getAdvisorDefs
Description copied from interface:ModuleDef2
Returns all the service advisor definitions built/provided by this module.- Specified by:
getAdvisorDefs
in interfaceModuleDef2
-
getStartups
Description copied from interface:ModuleDef2
Methods marked with @Startup are converted into Runnable instances and assigned here.- Specified by:
getStartups
in interfaceModuleDef2
-