Java 类com.google.inject.internal.LinkedBindingImpl 实例源码

项目:sql-layer    文件:Guicer.java   
public boolean isBoundTo(Class<?> interfaceClass, Class<?> targetClass) {
    Binding<?> existing = _injector.getExistingBinding(Key.get(interfaceClass));
    if(existing instanceof LinkedBindingImpl) {
        Key<?> key = ((LinkedBindingImpl<?>)existing).getLinkedKey();
        return key.getTypeLiteral().getRawType() == targetClass;
    }
    return false;
}