Class WrongConfigurationTypeGuard
- java.lang.Object
-
- org.apache.tapestry5.ioc.internal.util.WrongConfigurationTypeGuard
-
- All Implemented Interfaces:
InjectionResources
public class WrongConfigurationTypeGuard extends java.lang.Object implements InjectionResources
Used when invoking a contribute method to guard against a request for the wrong type of configuration interface.
-
-
Constructor Summary
Constructors Constructor Description WrongConfigurationTypeGuard(java.lang.String serviceId, java.lang.Class guardType, java.lang.Class expectedType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
findResource(java.lang.Class<T> type, java.lang.reflect.Type genericType)
Given the field type, provide the matching resource value, or null.
-
-
-
Constructor Detail
-
WrongConfigurationTypeGuard
public WrongConfigurationTypeGuard(java.lang.String serviceId, java.lang.Class guardType, java.lang.Class expectedType)
-
-
Method Detail
-
findResource
public <T> T findResource(java.lang.Class<T> type, java.lang.reflect.Type genericType)
Description copied from interface:InjectionResources
Given the field type, provide the matching resource value, or null.- Specified by:
findResource
in interfaceInjectionResources
- Parameters:
type
- type of field or parametergenericType
- generic type information associated with field or parameter- Returns:
- the corresponding value, or null
-
-