public static String getQualifiedReferenceText(PbRef ref) {
   StringBuilder sbuilder = new StringBuilder();
   if (!appendName(ref, sbuilder)) {
     return null;
   }
   return sbuilder.toString();
 }
 private static boolean appendName(PbRef ref, StringBuilder builder) {
   String refName = ref.getReferenceName();
   if (refName == null) {
     return false;
   }
   PbRef qualifier = (PbRef) ref.getQualifier();
   if (qualifier != null) {
     appendName(qualifier, builder);
     builder.append(".");
   }
   builder.append(refName);
   return true;
 }