org.apache.tapestry5.ioc.internal.util

## Class WrongConfigurationTypeGuard

- java.lang.Object
- - org.apache.tapestry5.ioc.internal.util.WrongConfigurationTypeGuard

- All Implemented Interfaces:
    InjectionResources

      public class WrongConfigurationTypeGuard
      extends 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 and Description
    `WrongConfigurationTypeGuard(String serviceId, Class guardType, Class expectedType)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T> T` | `findResource(Class<T> type, Type genericType)` Given the field type, provide the matching resource value, or null.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### WrongConfigurationTypeGuard

          public WrongConfigurationTypeGuard(String serviceId,
                                             Class guardType,
                                             Class expectedType)

  - ### Method Detail

    - #### findResource

          public <T> T findResource(Class<T> type,
                                    Type genericType)

      Description copied from interface: `InjectionResources`
      Given the field type, provide the matching resource value, or null.
      Specified by:
        `findResource` in interface `InjectionResources`
      Parameters:
        `type` - type of field or parameter
        `genericType` - generic type information associated with field or parameter
      Returns:
        the corresponding value, or null

${project.version} - Copyright © 2003-2015 The Apache Software Foundation.