org.apache.tapestry5.ioc.internal
Class ValidatingConfigurationWrapper<T>

java.lang.Object
  extended by org.apache.tapestry5.ioc.internal.ValidatingConfigurationWrapper<T>
All Implemented Interfaces:
Configuration<T>

public class ValidatingConfigurationWrapper<T>
extends Object
implements Configuration<T>

Wraps a Collection as a Configuration and perform validation that collected value are of the correct type.


Constructor Summary
ValidatingConfigurationWrapper(Collection<T> collection, String serviceId, Class expectedType, ObjectLocator locator)
           
 
Method Summary
 void add(T object)
          Adds an object to the service's contribution.
 void addInstance(Class<? extends T> clazz)
          Automatically instantiates an instance of the class, with dependencies injeted, and adds it to the configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidatingConfigurationWrapper

public ValidatingConfigurationWrapper(Collection<T> collection,
                                      String serviceId,
                                      Class expectedType,
                                      ObjectLocator locator)
Method Detail

add

public void add(T object)
Description copied from interface: Configuration
Adds an object to the service's contribution.

Specified by:
add in interface Configuration<T>
Parameters:
object - to add to the service's configuration

addInstance

public void addInstance(Class<? extends T> clazz)
Description copied from interface: Configuration
Automatically instantiates an instance of the class, with dependencies injeted, and adds it to the configuration.

Specified by:
addInstance in interface Configuration<T>
Parameters:
clazz - what class to instantiate


Copyright © 2006-2009 Apache Software Foundation. All Rights Reserved.