public <T> T getInstanceOfType(final Class<T> type, ComponentMap cmap){
try{
final Component<T> cc = getComponentOfType(type);
if(cc==null){
throw new UnresolvedComponentException(type);
}
return cc.create(cmap.getDependencyOfType(type, cmap));
}
catch(YanException e){
e.push("getInstanceOfType <" + Misc.getTypeName(type)+">");