Пример #1
0
  public void type(Type t) {
    handleIndent();
    if (t instanceof RefType) {

      String name = ((RefType) t).getSootClass().getJavaStyleName();
      /*
       * March 30th 2006, Nomair
       * Adding check to check that the fully qualified name can actually be removed
       */
      if (!name.equals(((RefType) t).getSootClass().toString())) {
        // means javaStyle name is probably shorter check that there is no class clash in imports
        // for this

        // System.out.println(">>>>Type is"+t.toString());
        // System.out.println(">>>>Name is"+name);
        name =
            RemoveFullyQualifiedName.getReducedName(
                body.getImportList(), ((RefType) t).getSootClass().toString(), t);
      }
      output.append(name);
    } else if (t instanceof ArrayType) {
      ((ArrayType) t).toString(this);
    } else {
      output.append(t.toString());
    }
  }