Logo Search packages:      
Sourcecode: japitools version File versions  Download package

static String net::wuffies::japi::Japize::getObjComparableString ( CallWrapper  call  )  throws ClassNotFoundException [inline, static, private]

Get a string containing the name, parameter types and thrown exceptions for a particular method. Returns null on a constructor. Designed to allow comparing interface methods against Object methods. NOTE that this will potentially not work correctly if generic methods are ever added to Object itself (because of "@0" etc meaning different things). Oh, how I hope that never happens...

Definition at line 1015 of file Japize.java.

References includeException().

Referenced by japizeClass().

                                                                                               {
    if (call.getName().equals("")) return null;
    String s = call.getName() + "(";
    Type[] params = call.getParameterTypes();
    for (int i = 0; i < params.length; i++) {
      if (i > 0) s += ",";
      s += params[i].getTypeSig(call);
    }
    s += ")" + call.getReturnType().getTypeSig(call);
    NonArrayRefType[] excps = call.getExceptionTypes();
    TreeSet exstrs = new TreeSet();
    for (int i = 0; i < excps.length; i++) {
      if (includeException(excps, i)) exstrs.add(excps[i].getJavaRepr(call));
    }
    for (Iterator i = exstrs.iterator(); i.hasNext(); ) {
      s += "*" + i.next();
    }
    return s;
  }


Generated by  Doxygen 1.6.0   Back to index