コード例 #1
0
 @Override
 public void visit(Tree.Type that) {
   super.visit(that);
   if (that.getTypeModel().getDeclaration().equals(declaration)) {
     refs++;
   }
 }
コード例 #2
0
 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;
     }
   }
 }