private final static DeclareInstanceResolver defaultResolver = new DefaultDeclareInstanceResolver();
@SuppressWarnings("unchecked")
public final static <T> T createInstance(Object declaration) {
WebApplicationConfiguration conf = (WebApplicationConfiguration) Context.getCurrentThreadContext().getConfiguration();
List<DeclareInstanceResolver> resolverList = conf.getInstanceResolverList();
Object handler = null;
for (DeclareInstanceResolver resolver : resolverList) {
handler = resolver.resolve(declaration);
if (handler != null) {
break;