protected static Definition findUnambiguousDeclaration(Token t) { if (t == null) return null; List<Definition> defs = t.resolveBinding(); if (defs.size() <= 0 || defs.size() > 1) return null; return defs.get(0); }
protected static boolean isUniquelyDefinedIdentifer(Token t) { return isBoundIdentifier(t) && t.resolveBinding().size() == 1; }
protected static boolean isBoundIdentifier(Token t) { return isIdentifier(t) && !t.resolveBinding().isEmpty(); }