Class DefaultModuleDefImpl
- java.lang.Object
 - 
- org.apache.tapestry5.ioc.internal.DefaultModuleDefImpl
 
 
- 
- All Implemented Interfaces:
 ModuleDef,ModuleDef2,ServiceDefAccumulator
public class DefaultModuleDefImpl extends Object implements 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
Constructors Constructor Description DefaultModuleDefImpl(Class<?> moduleClass, org.slf4j.Logger logger, PlasticProxyFactory proxyFactory) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddServiceDef(ServiceDef serviceDef)Set<AdvisorDef>getAdvisorDefs()Returns all the service advisor definitions built/provided by this module.ClassgetBuilderClass()Returns the class that will be instantiated.Set<ContributionDef>getContributionDefs()Returns all the contribution definitions built/provided by this module.Set<DecoratorDef>getDecoratorDefs()Returns all the decorator definitions built/provided by this module.StringgetLoggerName()Returns the name used to create aLoggerinstance.ServiceDefgetServiceDef(String serviceId)Returns a service definition via the service's id.Set<String>getServiceIds()Returns the ids of the services built/provided by the module.Set<StartupDef>getStartups()Methods marked with @Startup are converted into Runnable instances and assigned here.StringtoString()Identifies the module class and a list of service ids within the module. 
 - 
 
- 
- 
Constructor Detail
- 
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 Detail
- 
toString
public String toString()
Identifies the module class and a list of service ids within the module. 
- 
getBuilderClass
public Class getBuilderClass()
Description copied from interface:ModuleDefReturns 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:
 getBuilderClassin interfaceModuleDef
 
- 
getServiceIds
public Set<String> getServiceIds()
Description copied from interface:ModuleDefReturns the ids of the services built/provided by the module.- Specified by:
 getServiceIdsin interfaceModuleDef
 
- 
getServiceDef
public ServiceDef getServiceDef(String serviceId)
Description copied from interface:ModuleDefReturns 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:
 getServiceDefin interfaceModuleDef- Parameters:
 serviceId- the id of the service to retrieve (case is ignored)- Returns:
 - service definition or null if it doesn't exist
 
 
- 
addServiceDef
public void addServiceDef(ServiceDef serviceDef)
- Specified by:
 addServiceDefin interfaceServiceDefAccumulator
 
- 
getDecoratorDefs
public Set<DecoratorDef> getDecoratorDefs()
Description copied from interface:ModuleDefReturns all the decorator definitions built/provided by this module.- Specified by:
 getDecoratorDefsin interfaceModuleDef
 
- 
getContributionDefs
public Set<ContributionDef> getContributionDefs()
Description copied from interface:ModuleDefReturns all the contribution definitions built/provided by this module.- Specified by:
 getContributionDefsin interfaceModuleDef
 
- 
getLoggerName
public String getLoggerName()
Description copied from interface:ModuleDefReturns the name used to create aLoggerinstance. This is typically the builder class name.- Specified by:
 getLoggerNamein interfaceModuleDef
 
- 
getAdvisorDefs
public Set<AdvisorDef> getAdvisorDefs()
Description copied from interface:ModuleDef2Returns all the service advisor definitions built/provided by this module.- Specified by:
 getAdvisorDefsin interfaceModuleDef2
 
- 
getStartups
public Set<StartupDef> getStartups()
Description copied from interface:ModuleDef2Methods marked with @Startup are converted into Runnable instances and assigned here.- Specified by:
 getStartupsin interfaceModuleDef2
 
 - 
 
 -