001 /* 002 @license.text@ 003 */ 004 package biz.hammurapi.config; 005 006 /** 007 * Checks that class to be instantiated is acceptable in a given context. 008 * Use this to avoid ClassCastExceptions in your code. 009 * @author Pavel Vlasov 010 * @version $Revision: 1.1 $ 011 */ 012 public interface ClassAcceptor { 013 /** 014 * Checks that class to be instantiated is acceptable. 015 * @param clazz Class to be checked. 016 * @throws ConfigurationException if clazz is unacceptable. 017 */ 018 void accept(Class clazz) throws ConfigurationException; 019 }