IBinding x = node.resolveBinding();
if (x instanceof ITypeBinding) {
hardDep((ITypeBinding) x);
print(CName.relative((ITypeBinding) x, type, true));
} else {
Name qualifier = node.getQualifier();
IBinding b = qualifier.resolveBinding();
if (b instanceof ITypeBinding) {
hardDep((ITypeBinding) b);
print(CName.relative((ITypeBinding) b, type, true) + "::");
} else if (b instanceof IVariableBinding) {
IVariableBinding vb = (IVariableBinding) b;
hardDep(vb.getType());
boolean hidden = false;
if (x instanceof IVariableBinding) {
hidden = hidden(vb.getType(), (IVariableBinding) x);
}
if (hidden) {
staticCast(qualifier.resolveTypeBinding(),
((IVariableBinding) x).getDeclaringClass());
}
npcAccept(qualifier);
if (hidden) {
print(")");
}
print("->");
} else if (b instanceof IPackageBinding) {
qualifier.accept(this);
print("::");
} else {
throw new Error("Unknown binding " + b.getClass());
}