Class ContributionDefImpl
java.lang.Object
org.apache.tapestry5.ioc.internal.ContributionDefImpl
- All Implemented Interfaces:
ContributionDef,ContributionDef2,ContributionDef3,Markable
-
Constructor Summary
ConstructorsConstructorDescriptionContributionDefImpl(String serviceId, Method contributorMethod, boolean optional, PlasticProxyFactory proxyFactory, Class serviceInterface, Set<Class> markers) -
Method Summary
Modifier and TypeMethodDescriptionvoidcontribute(ModuleBuilderSource moduleSource, ServiceResources resources, Configuration configuration) Performs the work needed to contribute into the standard, unordered configuration.voidcontribute(ModuleBuilderSource moduleSource, ServiceResources resources, MappedConfiguration configuration) Performs the work needed to contribute into the mapped configuration.voidcontribute(ModuleBuilderSource moduleSource, ServiceResources resources, OrderedConfiguration configuration) Performs the work needed to contribute into the ordered configuration.Returns an optional set of marker annotation.Identifies the service contributed to.Returns the service interface associated with the service.booleanIs this contribution optional, meaning it is not an error if the service to which the contribution is targetted does not exist.toString()
-
Constructor Details
-
ContributionDefImpl
public ContributionDefImpl(String serviceId, Method contributorMethod, boolean optional, PlasticProxyFactory proxyFactory, Class serviceInterface, Set<Class> markers)
-
-
Method Details
-
toString
-
isOptional
Description copied from interface:ContributionDef3Is this contribution optional, meaning it is not an error if the service to which the contribution is targetted does not exist.- Specified by:
isOptionalin interfaceContributionDef3
-
getServiceId
Description copied from interface:ContributionDefIdentifies the service contributed to.- Specified by:
getServiceIdin interfaceContributionDef
-
contribute
public void contribute(ModuleBuilderSource moduleSource, ServiceResources resources, Configuration configuration) Description copied from interface:ContributionDefPerforms the work needed to contribute into the standard, unordered configuration.- Specified by:
contributein interfaceContributionDef- Parameters:
moduleSource- the source, if needed, of the module instance associated with the contributionresources- allows access to services visible to the moduleconfiguration- the unordered configuration into which values should be loaded. This instance will encapsulate all related error checks (such as passing of nulls or inappropriate classes).
-
contribute
public void contribute(ModuleBuilderSource moduleSource, ServiceResources resources, OrderedConfiguration configuration) Description copied from interface:ContributionDefPerforms the work needed to contribute into the ordered configuration.- Specified by:
contributein interfaceContributionDef- Parameters:
moduleSource- the source, if needed, of the module instance associated with the contributionresources- allows access to services visible to the moduleconfiguration- the ordered configuration into which values should be loaded. This instance will encapsulate all related error checks (such as passing of nulls or inappropriate classes).
-
contribute
public void contribute(ModuleBuilderSource moduleSource, ServiceResources resources, MappedConfiguration configuration) Description copied from interface:ContributionDefPerforms the work needed to contribute into the mapped configuration.- Specified by:
contributein interfaceContributionDef- Parameters:
moduleSource- the source, if needed, of the module instance associated with the contributionresources- allows access to services visible to the moduleconfiguration- the mapped configuration into which values should be loaded. This instance will encapsulate all related error checks (such as passing of null keys or values or inappropriate classes, or duplicate keys).
-
getMarkers
Description copied from interface:MarkableReturns an optional set of marker annotation. Marker annotations are used to disambiguate services; the combination of a marker annotation and a service type is expected to be unique. Note that it is not possible to identify which annotations are markers and which are not when this set is constructed, so it may include non-marker annotations.- Specified by:
getMarkersin interfaceMarkable- See Also:
-
getServiceInterface
Description copied from interface:MarkableReturns the service interface associated with the service.- Specified by:
getServiceInterfacein interfaceMarkable- See Also:
-