@Override public void visit(Tree.Type that) { super.visit(that); if (that.getTypeModel().getDeclaration().equals(declaration)) { refs++; } }
private static String type(Tree.Type type) { if (type == null) { return "<Unknown>"; } else { ProducedType tm = type.getTypeModel(); if (tm == null) { return "<Unknown>"; } else { boolean sequenced = type instanceof Tree.SequencedType; if (sequenced) { tm = type.getUnit().getIteratedType(tm); if (tm == null) { return "<Unknown>"; } } String tn = tm.getProducedTypeName(); if (sequenced) { tn += "..."; } return tn; } } }